Documentation
¶
Index ¶
- Constants
- func LoadImage(filename string, imageChan chan ImageMessage)
- type Colour
- type ImageMessage
- type Point
- type Rectangle
- func (r *Rectangle) ClickInRect(x, y float32) bool
- func (r *Rectangle) Draw(program uint32)
- func (r *Rectangle) MakeVao() uint32
- func (r *Rectangle) Pos() (float32, float32)
- func (r *Rectangle) RequestTexture(filename string, imageChan chan ImageMessage)
- func (r *Rectangle) Scale(scale float32)
- func (r *Rectangle) SetDefaultTexture()
- func (r *Rectangle) SetTexCoords(texture *Texture)
- func (r *Rectangle) Size() (int, int)
- func (r *Rectangle) UpdateXPos(dx float32)
- func (r *Rectangle) UpdateYPos(dy float32)
- type TexCoord
- type Texture
- type Vertex
Constants ¶
View Source
const ( PointLen = 3 ColourLen = 4 TexCoordLen = 2 PointSize = PointLen * float32Size ColourSize = ColourLen * float32Size TexCoordSize = TexCoordLen * float32Size VertexSize = PointSize + ColourSize + TexCoordSize )
View Source
const (
NumVertices = 4
)
Variables ¶
This section is empty.
Functions ¶
func LoadImage ¶
func LoadImage(filename string, imageChan chan ImageMessage)
Types ¶
type ImageMessage ¶
type Rectangle ¶
type Rectangle struct {
Handle uint32
// contains filtered or unexported fields
}
func NewRectangle ¶
func (*Rectangle) ClickInRect ¶
func (*Rectangle) RequestTexture ¶
func (r *Rectangle) RequestTexture(filename string, imageChan chan ImageMessage)
func (*Rectangle) SetDefaultTexture ¶
func (r *Rectangle) SetDefaultTexture()
func (*Rectangle) SetTexCoords ¶
func (*Rectangle) UpdateXPos ¶
func (*Rectangle) UpdateYPos ¶
type Texture ¶
var (
DefaultTexture *Texture
)
func NewTexture ¶
func NewTexture(filename string, imageChan chan ImageMessage) (*Texture, error)
func (*Texture) SetTexCoords ¶
Click to show internal directories.
Click to hide internal directories.