Documentation ¶
Index ¶
- Constants
- type BasicRenderGroup2D
- func (g *BasicRenderGroup2D) AddObject(obj *GenericObject2D) int
- func (g *BasicRenderGroup2D) Deinit()
- func (g *BasicRenderGroup2D) InitShader()
- func (g *BasicRenderGroup2D) NotifyObjectChanged()
- func (g *BasicRenderGroup2D) RemoveObject(id int)
- func (g *BasicRenderGroup2D) Render()
- func (g *BasicRenderGroup2D) SetAttribute(attribute BasicRenderGroup2DAttribute, value bool)
- func (g *BasicRenderGroup2D) SetRotationModes(r1, r2 RotationMode)
- type BasicRenderGroup2DAttribute
- type GenericObject2D
- type RotationMode
Constants ¶
View Source
const ( // RotationEnabled attribute RotationEnabled = iota // ColorEnabled attribute ColorEnabled = iota // TexturesEnabled attribute TexturesEnabled = iota )
View Source
const ( RotationNone RotationMode = iota RotationX = iota RotationY = iota RotationZ = iota )
enum for rotation axes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicRenderGroup2D ¶
type BasicRenderGroup2D struct {
// contains filtered or unexported fields
}
BasicRenderGroup2D is a 2D render group that supports colors, textures and rotation.
func NewBasicRenderGroup2D ¶
func NewBasicRenderGroup2D(id string, glType uint32, expectedSize int32, changeRatio float32, texture uint32) (*graphics.RenderGroup, *BasicRenderGroup2D)
NewBasicRenderGroup2D creates a new basic 2d render group
func (*BasicRenderGroup2D) AddObject ¶
func (g *BasicRenderGroup2D) AddObject(obj *GenericObject2D) int
AddObject adds an object and returns an id for it.
func (*BasicRenderGroup2D) InitShader ¶
func (g *BasicRenderGroup2D) InitShader()
InitShader is run once per program
func (*BasicRenderGroup2D) NotifyObjectChanged ¶
func (g *BasicRenderGroup2D) NotifyObjectChanged()
NotifyObjectChanged tells the rendergroup that an object has changed
func (*BasicRenderGroup2D) RemoveObject ¶
func (g *BasicRenderGroup2D) RemoveObject(id int)
RemoveObject removes an object by id
func (*BasicRenderGroup2D) Render ¶
func (g *BasicRenderGroup2D) Render()
Render implements the rendering
func (*BasicRenderGroup2D) SetAttribute ¶
func (g *BasicRenderGroup2D) SetAttribute(attribute BasicRenderGroup2DAttribute, value bool)
SetAttribute sets an attribute, see *Enabled constants
func (*BasicRenderGroup2D) SetRotationModes ¶
func (g *BasicRenderGroup2D) SetRotationModes(r1, r2 RotationMode)
SetRotationModes sets which axis the first and second rotation should be around. Also enables rotation if it isn't already enabled.
type BasicRenderGroup2DAttribute ¶
type BasicRenderGroup2DAttribute int
BasicRenderGroup2DAttribute represents different kinds of functionality
Click to show internal directories.
Click to hide internal directories.