Documentation
¶
Index ¶
- Constants
- func DumpBuffer[N number](buf gl.Buffer) []N
- func DumpTexture(textureId gl.Texture) (*image.NRGBA, error)
- func DumpTextureAsPng(textureId gl.Texture, outfile io.Writer) error
- func DumpTextureAsPngFile(textureId gl.Texture, path string) error
- func GetActiveTextureUnit() gl.GLenum
- func GetBindingsSet() map[string]int
- func GetColorMatrix() []float64
- func GetColours() map[string]string
- func GetDepthRange() (float64, float64)
- func GetFlagSet() map[string]gl.GLenum
- func GetMatrixMode() gl.GLenum
- func GetModelViewMatrix() []float64
- func GetProjectionMatrix() []float64
- func GetTextureMatrix() []float64
- func GetViewport() (int32, int32, uint32, uint32)
- func ScreenShot(width, height int, out io.Writer)
- func ScreenShotNrgba(width, height int) *image.NRGBA
- type GlState
- type TexFormat
Constants ¶
View Source
const ( TexFormatRGBA = gl.RGBA TexFormatLuminanceAlpha = gl.LUMINANCE_ALPHA )
Variables ¶
This section is empty.
Functions ¶
func DumpBuffer ¶
Returns a slice of the data as it exists in the given OpenGL buffer. This needs to be run on the 'render thread'.
func GetActiveTextureUnit ¶
func GetBindingsSet ¶
func GetColorMatrix ¶
func GetColorMatrix() []float64
func GetColours ¶
func GetDepthRange ¶
Returns the current (near, far) values as set from the last glDepthRange call.
func GetFlagSet ¶
func GetMatrixMode ¶
Returns an enum denoting the current matrix mode.
func GetModelViewMatrix ¶
func GetModelViewMatrix() []float64
func GetProjectionMatrix ¶
func GetProjectionMatrix() []float64
func GetTextureMatrix ¶
func GetTextureMatrix() []float64
func GetViewport ¶
Returns (x-pos, y-pos, width, height) of the current viewport.
func ScreenShot ¶
func ScreenShotNrgba ¶
Types ¶
type GlState ¶
type GlState struct {
MatrixMode string
ModelViewMatrix []float64
ProjectionMatrix []float64
ColorMatrix []float64
TextureMatrix []float64
Colours map[string]string
Bindings map[string]int
FlagSet map[string]gl.GLenum
}
func GetGlState ¶
func GetGlState() *GlState
Returns a high-level description of what the current GL state is.
Click to show internal directories.
Click to hide internal directories.