Documentation ¶
Index ¶
- type Pixels
- func (p *Pixels) AppendDrawImageHistory(image *graphics.Image, vertices []int16, geom graphics.Matrix, ...)
- func (p *Pixels) At(idx int, image *graphics.Image, context *opengl.Context) (color.RGBA, error)
- func (p *Pixels) Clear()
- func (p *Pixels) CreateImage(context *opengl.Context, width, height int, filter opengl.Filter) (*graphics.Image, error)
- func (p *Pixels) DependsOn(target *graphics.Image) bool
- func (p *Pixels) Fill(clr color.RGBA)
- func (p *Pixels) HasDependency() bool
- func (p *Pixels) IsStale() bool
- func (p *Pixels) MakeStale()
- func (p *Pixels) ReadPixelsFromVRAMIfStale(image *graphics.Image, context *opengl.Context) error
- func (p *Pixels) ReplacePixels(pixels []uint8)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pixels ¶
type Pixels struct {
// contains filtered or unexported fields
}
Pixels represents pixels of an image for restoring when GL context is lost.
func (*Pixels) AppendDrawImageHistory ¶
func (*Pixels) At ¶
At returns a color value at idx.
Note that this must not be called until context is available. This means Pixels members must match with acutal state in VRAM.
func (*Pixels) CreateImage ¶
func (p *Pixels) CreateImage(context *opengl.Context, width, height int, filter opengl.Filter) (*graphics.Image, error)
CreateImage restores *graphics.Image from the pixels using its state.
func (*Pixels) HasDependency ¶
func (*Pixels) ReadPixelsFromVRAMIfStale ¶
func (*Pixels) ReplacePixels ¶
Click to show internal directories.
Click to hide internal directories.