Documentation
¶
Overview ¶
Package texture uploads images to the GPU and draws them. It interoperates with the standard library's image package: see FromImage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
type Button struct {
ID string
Tex *Texture
Size imgui.Vec2
OnClick func()
// contains filtered or unexported fields
}
Button draws a clickable image button. ID must be unique.
type Image ¶
Image draws a Texture at the given size (zero uses the texture's full size).
type Texture ¶
type Texture struct {
// contains filtered or unexported fields
}
Texture is a GPU texture handle.
func FromImage ¶
FromImage uploads any image.Image as a texture, converting it to RGBA as needed. A GL context must be current (it is during an app.Run frame).
func FromReader ¶
FromReader decodes an image from r and uploads it as a texture. A GL context must be current (it is during an app.Run frame).
Click to show internal directories.
Click to hide internal directories.