Documentation ¶
Index ¶
- Constants
- func FrameImage(label string, frameCache *graphics.FrameCache, key graphics.FrameCacheKey, ...)
- func TextureIDForBitmapFrame(key graphics.FrameCacheKey) imgui.TextureID
- func TextureIDForBitmapTexture(key resource.Key) imgui.TextureID
- func TextureImage(label string, cache *graphics.TextureCache, key resource.Key, size imgui.Vec2)
- func TextureSelector(label string, width float32, guiScale float32, count int, selectedIndex int, ...)
- type Context
- type OrientationView
- type TextureRenderer
Constants ¶
const ( // BitmapTextureTypeResource specifies a bitmap texture directly from resources. BitmapTextureTypeResource = 0x00 // BitmapTextureTypeFrame specifies a bitmap texture from the frame cache. BitmapTextureTypeFrame = 0x01 )
Variables ¶
This section is empty.
Functions ¶
func FrameImage ¶ added in v1.4.0
func FrameImage(label string, frameCache *graphics.FrameCache, key graphics.FrameCacheKey, size imgui.Vec2)
FrameImage renders an image centered and fitted within the given size.
func TextureIDForBitmapFrame ¶ added in v1.4.0
func TextureIDForBitmapFrame(key graphics.FrameCacheKey) imgui.TextureID
TextureIDForBitmapFrame returns a texture ID that identifies a bitmap texture from frame cache.
func TextureIDForBitmapTexture ¶
TextureIDForBitmapTexture returns a texture ID that identifies a bitmap texture from resources.
func TextureImage ¶ added in v0.5.0
func TextureImage(label string, cache *graphics.TextureCache, key resource.Key, size imgui.Vec2)
TextureImage renders an image centered and fitted within the given size.
func TextureSelector ¶ added in v0.4.0
func TextureSelector(label string, width float32, guiScale float32, count int, selectedIndex int, cache *graphics.TextureCache, keyResolver func(int) resource.Key, tooltipText func(int) string, changeCallback func(int))
TextureSelector renders a horizontal list of game textures, with selection capability.
Types ¶
type OrientationView ¶ added in v1.8.0
type OrientationView struct {
// contains filtered or unexported fields
}
OrientationView is a control that displays how an object is oriented. This is still not working properly. The orientation arrow is not properly rotated, and I suspect the typical issue of three-angle rotation versus quaternion rotation. Though I doubt the original engine used quaternions, it remains too confusing for me.
func NewOrientationView ¶ added in v1.8.0
func NewOrientationView(context Context, baseOrientation mgl.Mat4, rotation mgl.Vec3) *OrientationView
NewOrientationView returns a new instance.
func (*OrientationView) Dispose ¶ added in v1.8.0
func (view *OrientationView) Dispose()
Dispose cleans up resources of the view.
func (*OrientationView) Render ¶ added in v1.8.0
func (view *OrientationView) Render(orientation mgl.Vec3)
Render renders the orientation view for given orientation.
type TextureRenderer ¶ added in v1.8.0
type TextureRenderer struct {
// contains filtered or unexported fields
}
TextureRenderer is a renderer within which something can be rendered onto a texture. This texture can then be used to be displayed.
func NewTextureRenderer ¶ added in v1.8.0
func NewTextureRenderer(gl opengl.OpenGL) *TextureRenderer
NewTextureRenderer returns a new instance.
func (*TextureRenderer) Dispose ¶ added in v1.8.0
func (renderer *TextureRenderer) Dispose()
Dispose cleans up resources.
func (*TextureRenderer) Handle ¶ added in v1.8.0
func (renderer *TextureRenderer) Handle() uint32
Handle returns the texture handle.
func (*TextureRenderer) Render ¶ added in v1.8.0
func (renderer *TextureRenderer) Render(nested func())
Render calls the nested function. All drawing commands within this function will end up in the texture.
func (*TextureRenderer) Size ¶ added in v1.8.0
func (renderer *TextureRenderer) Size() (width, height float32)
Size returns the dimensions of the texture, in pixels.