// Code generated by cmd/codegen from https://github.com/AllenDang/cimgui-go.
// DO NOT EDIT.

package opengl3

import (
	"github.com/AllenDang/cimgui-go/imgui"
	"github.com/AllenDang/cimgui-go/internal"
)

// #include "structs_accessor.h"
// #include "wrapper.h"
// #include "../../imgui/extra_types.h"
import "C"

func CreateDeviceObjects() bool {
	return C.ImGui_ImplOpenGL3_CreateDeviceObjects() == C.bool(true)
}

func DestroyDeviceObjects() {
	C.ImGui_ImplOpenGL3_DestroyDeviceObjects()
}

// InitV parameter default value hint:
// glsl_version: nullptr
func InitV(glsl_version string) bool {
	glsl_versionArg, glsl_versionFin := internal.WrapString[C.char](glsl_version)

	defer func() {
		glsl_versionFin()
	}()
	return C.ImGui_ImplOpenGL3_Init(glsl_versionArg) == C.bool(true)
}

func NewFrame() {
	C.ImGui_ImplOpenGL3_NewFrame()
}

func RenderDrawData(draw_data *imgui.DrawData) {
	draw_dataArg, draw_dataFin := draw_data.Handle()
	C.ImGui_ImplOpenGL3_RenderDrawData(internal.ReinterpretCast[*C.ImDrawData](draw_dataArg))

	draw_dataFin()
}

func Shutdown() {
	C.ImGui_ImplOpenGL3_Shutdown()
}

func Init() bool {
	return C.wrap_ImGui_ImplOpenGL3_Init() == C.bool(true)
}
