imguiexamples

package
v0.0.0-...-82c7909 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2021 License: MIT, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GLFW

type GLFW struct {
	// contains filtered or unexported fields
}

GLFW implements a platform based on github.com/go-gl/glfw (v3.2).

func NewGLFW

func NewGLFW(io imgui.IO, window *glfw.Window) *GLFW

NewGLFW attempts to initialize a GLFW context.

func (*GLFW) ClipboardText

func (platform *GLFW) ClipboardText() string

ClipboardText returns the current clipboard text, if available.

func (*GLFW) DisplaySize

func (platform *GLFW) DisplaySize() [2]float32

DisplaySize returns the dimension of the display.

func (*GLFW) Dispose

func (platform *GLFW) Dispose()

Dispose cleans up the resources.

func (*GLFW) FramebufferSize

func (platform *GLFW) FramebufferSize() [2]float32

FramebufferSize returns the dimension of the framebuffer.

func (*GLFW) NewFrame

func (platform *GLFW) NewFrame()

NewFrame marks the begin of a render pass. It forwards all current state to imgui IO.

func (*GLFW) PostRender

func (platform *GLFW) PostRender()

PostRender performs a buffer swap.

func (*GLFW) ProcessEvents

func (platform *GLFW) ProcessEvents()

ProcessEvents handles all pending window events.

func (*GLFW) SetClipboardText

func (platform *GLFW) SetClipboardText(text string)

SetClipboardText sets the text as the current clipboard text.

func (*GLFW) ShouldStop

func (platform *GLFW) ShouldStop() bool

ShouldStop returns true if the window is to be closed.

type GLFWClientAPI

type GLFWClientAPI string

GLFWClientAPI identifies the render system that shall be initialized.

const (
	GLFWClientAPIOpenGL2 GLFWClientAPI = "OpenGL2"
	GLFWClientAPIOpenGL3 GLFWClientAPI = "OpenGL3"
)

This is a list of GLFWClientAPI constants.

type OpenGL3

type OpenGL3 struct {
	// contains filtered or unexported fields
}

OpenGL3 implements a renderer based on github.com/go-gl/gl (v3.2-core).

func NewOpenGL3

func NewOpenGL3(io imgui.IO) *OpenGL3

NewOpenGL3 attempts to initialize a renderer. An OpenGL context has to be established before calling this function.

func (*OpenGL3) Dispose

func (renderer *OpenGL3) Dispose()

Dispose cleans up the resources.

func (*OpenGL3) PreRender

func (renderer *OpenGL3) PreRender(clearColor [3]float32)

PreRender clears the framebuffer.

func (*OpenGL3) Render

func (renderer *OpenGL3) Render(displaySize [2]float32, framebufferSize [2]float32, drawData imgui.DrawData)

Render translates the ImGui draw data to OpenGL3 commands.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL