Versions in this module Expand all Collapse all v1 v1.1.0 Mar 8, 2018 Changes in this version + const BytesPerRgba + const ColorsPerPalette + type Bitmap struct + Height int + Pixels []byte + Width int + func BitmapFromRaw(raw model.RawBitmap) Bitmap + type BitmapRetriever func() *BitmapTexture + type BitmapTexture struct + func NewBitmapTexture(gl opengl.OpenGl, width, height int, pixelData []byte) *BitmapTexture + func (tex *BitmapTexture) Dispose() + func (tex *BitmapTexture) Handle() uint32 + func (tex *BitmapTexture) Size() (width, height float32) + func (tex *BitmapTexture) UV() (u, v float32) + type BitmapTextureRenderer struct + func NewBitmapTextureRenderer(renderContext *RenderContext, paletteTexture Texture) *BitmapTextureRenderer + func (renderer *BitmapTextureRenderer) Dispose() + func (renderer *BitmapTextureRenderer) Render(modelMatrix *mgl.Mat4, texture Texture, textureRect Rectangle) + type BufferedTextureStore struct + func NewBufferedTextureStore(query TextureQuery) *BufferedTextureStore + func (store *BufferedTextureStore) Reset() + func (store *BufferedTextureStore) SetTexture(id TextureKey, texture *BitmapTexture) + func (store *BufferedTextureStore) Texture(id TextureKey) *BitmapTexture + type Color interface + AsVector func() *[4]float32 + func RGBA(r, g, b, a float32) Color + type ColorProvider func(index int) (byte, byte, byte, byte) + type Context interface + BitmapsStore func() *BufferedTextureStore + GameObjectBitmapsStore func() *BufferedTextureStore + GameObjectIconsStore func() *BufferedTextureStore + NewPaletteTexture func(colorProvider ColorProvider) *PaletteTexture + RectangleRenderer func() *RectangleRenderer + TextPainter func() TextPainter + Texturize func(bmp *Bitmap) *BitmapTexture + UITextRenderer func() *BitmapTextureRenderer + WorldTextureStore func(size model.TextureSize) *BufferedTextureStore + type PaletteTexture struct + func NewPaletteTexture(gl opengl.OpenGl, colorProvider ColorProvider) *PaletteTexture + func (tex *PaletteTexture) Dispose() + func (tex *PaletteTexture) Handle() uint32 + func (tex *PaletteTexture) Update() + type Rectangle interface + Bottom func() float32 + Left func() float32 + Right func() float32 + Top func() float32 + func RectByCoord(left, top, right, bottom float32) Rectangle + type RectangleRenderer struct + func NewRectangleRenderer(gl opengl.OpenGl, projectionMatrix *mgl.Mat4) *RectangleRenderer + func (renderer *RectangleRenderer) Dispose() + func (renderer *RectangleRenderer) Fill(left, top, right, bottom float32, fillColor Color) + type RenderContext struct + func NewBasicRenderContext(gl opengl.OpenGl, projectionMatrix *mgl.Mat4, viewMatrix *mgl.Mat4) *RenderContext + func (context *RenderContext) OpenGl() opengl.OpenGl + func (context *RenderContext) ProjectionMatrix() *mgl.Mat4 + func (context *RenderContext) ViewMatrix() *mgl.Mat4 + type StandardBitmapper struct + func NewStandardBitmapper(palette []color.Color) *StandardBitmapper + func (bitmapper *StandardBitmapper) Map(img image.Image) Bitmap + func (bitmapper *StandardBitmapper) MapColor(clr color.Color) (palIndex byte) + type TextBitmap struct + func (bmp TextBitmap) CharOffset(line, char int) int + func (bmp TextBitmap) LineCount() int + func (bmp TextBitmap) LineHeight() int + func (bmp TextBitmap) LineLength(line int) int + type TextPainter interface + Paint func(text string, widthLimit int) TextBitmap + func NewBitmapTextPainter(font model.Font) TextPainter + type Texture interface + Dispose func() + Handle func() uint32 + type TextureKey int + func TextureKeyFromInt(value int) TextureKey + func (key TextureKey) ToInt() int + type TextureQuery func(id TextureKey) + type TextureRenderer interface + Render func(modelMatrix *mgl.Mat4, texture Texture, textureRect Rectangle)