Documentation ¶
Overview ¶
Package graphics provides functionality for 2D graphics rendering, including textures, sprites, text, and shapes.
Index ¶
Constants ¶
View Source
const ( OP_CODE_VERTEX = 1.0 OP_CODE_CIRCLE = 2.0 OP_CODE_RECT = 3.0 OP_CODE_TEXT = 4.0 OP_CODE_TEXTURE = 5.0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventManager ¶
type EventManager interface {
PollEvents() bool
}
type Framebuffer ¶
type GraphicsBackend ¶
type GraphicsBackend interface { WindowManager InputManager EventManager TextureManager Clear(c color.Color) Close() Init() Draw() Render(shape Renderable) RenderText(text string, options *TextRenderOptions) LoadFont(fontPath []byte) (Font, error) SwapBuffers() GetViewportSize() (int, int) AddFramebuffer(width, height int) (Framebuffer, error) RenderFramebuffer(fb Framebuffer, options *TextureRenderOptions) BindFramebuffer(fb Framebuffer) UnbindFramebuffer() Begin() End() }
type InputManager ¶
type Renderable ¶
type TextRenderOptions ¶
type TextureManager ¶
type TextureRenderOptions ¶
type WindowManager ¶
type WindowManager interface { DisableWindowResize() SetFullScreenBorderless(v bool) SetBorderlessWindowed(v bool) SetWindowTitle(title string) DestroyWindow() SetWindowSize(width int, height int) GetWindowSize() (int, int) GetWindowPosition() (x int, y int) SetWindowPosition(x, y int) SetResizedCallback(fn func(physicalWidth, physicalHeight uint32)) ShouldClose() bool IsDisposed() bool }
Click to show internal directories.
Click to hide internal directories.