Documentation ¶
Index ¶
- Constants
- type GLFW
- func (platform *GLFW) ClipboardText() (string, error)
- func (platform *GLFW) DisplaySize() [2]float32
- func (platform *GLFW) Dispose()
- func (platform *GLFW) FramebufferSize() [2]float32
- func (platform *GLFW) NewFrame()
- func (platform *GLFW) PostRender()
- func (platform *GLFW) ProcessEvents()
- func (platform *GLFW) SetClipboardText(text string)
- func (platform *GLFW) ShouldStop() bool
- func (platform *GLFW) SwapInterval(interval int)
- type GLFWClientAPI
- type StringError
Constants ¶
const ( // ErrUnsupportedClientAPI is used in case the API is not available by the platform. ErrUnsupportedClientAPI = StringError("unsupported ClientAPI") )
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.ImGuiIO, clientAPI GLFWClientAPI) (*GLFW, error)
NewGLFW attempts to initialize a GLFW context.
func (*GLFW) ClipboardText ¶
ClipboardText returns the current clipboard text, if available.
func (*GLFW) DisplaySize ¶
DisplaySize returns the dimension of the display.
func (*GLFW) FramebufferSize ¶
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) ProcessEvents ¶
func (platform *GLFW) ProcessEvents()
ProcessEvents handles all pending window events.
func (*GLFW) SetClipboardText ¶
SetClipboardText sets the text as the current clipboard text.
func (*GLFW) ShouldStop ¶
ShouldStop returns true if the window is to be closed.
func (*GLFW) SwapInterval ¶
SwapInterval sets the GLFW swap interval.
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 StringError ¶
type StringError string
StringError describes a basic error with static information.