Documentation ¶
Overview ¶
Package framebuffer provides a convenient way of working with OpenGL framebuffers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flip ¶ added in v0.32.0
type Flip struct {
// contains filtered or unexported fields
}
Flip provides a two paged framebuffer
func (*Flip) Copy ¶ added in v0.35.2
Copy another framebuffer to the Flip instance. Framebuffers must be of the same dimensions
func (*Flip) Destroy ¶ added in v0.32.0
func (fb *Flip) Destroy()
Destroy should be called when the Flip is no longer required
func (*Flip) Dimensions ¶ added in v0.32.0
Dimensions returns the width and height of the frame buffer used in the Flip
func (*Flip) Process ¶ added in v0.32.0
Process the Flip using the suppied draw function. The draw function should typically invoke a GLSL shader. The texture ID of the shader will be returned by the Process function. This is ID is the same as the ID returned by the Texture() function
func (*Flip) Setup ¶ added in v0.32.0
Setup Flip for specified dimensions
Returns true if any previous texture data has been lost. This can happen when the dimensions have changed. By definition, the first call to Setup() will always return false.
If the supplied width or height are less than zero the function will return false with no explanation.
type Single ¶ added in v0.32.0
type Single struct {
// contains filtered or unexported fields
}
Single provides a single framebuffer
func NewSingle ¶ added in v0.32.0
NewFlip is the preferred method of initialisation of the Single type
func (*Single) Copy ¶ added in v0.35.2
Copy another framebuffer to the Single instance. Framebuffers must be of the same dimensions
func (*Single) Destroy ¶ added in v0.32.0
func (fb *Single) Destroy()
Destroy should be called when the Single is no longer required
func (*Single) Dimensions ¶ added in v0.32.0
Dimensions returns the width and height of the frame buffer used in the Single
func (*Single) Process ¶ added in v0.32.0
Process the Single using the suppied draw function. The draw function should typically invoke a GLSL shader. The texture ID of the shader will be returned by the Process function. This is ID is the same as the ID returned by the Texture() function.
func (*Single) Setup ¶ added in v0.32.0
Setup Single for specified dimensions
Returns true if any previous texture data has been lost. This can happen when the dimensions have changed. By definition, the first call to Setup() will always return false.
If the supplied width or height are less than zero the function will return false with no explanation.