Documentation ¶
Index ¶
- func FixImage(img image.Image) *image.RGBA
- func IsShaderVersionSupported(requested string) bool
- func LoadImage(file string) (*image.RGBA, error)
- func ShaderVersion() string
- func Version() string
- func Viewport(v image.Rectangle)
- type Attrib
- type Buffer
- type BufferAccessFrequencyEnum
- type BufferAccessNatureEnum
- type BufferOption
- type Clear
- type ClearOption
- type Draw
- type DrawMode
- type DrawOption
- type Extensions
- type GeometryInputType
- type GeometryOutputType
- type Program
- type ProgramOption
- type Texture
- type TextureFilterEnum
- type TextureOption
- type TextureWrapEnum
- type Uniform
- type VAO
- type VAOOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShaderVersion ¶
func ShaderVersion() string
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func NewBuffer ¶
func NewBuffer(idata interface{}, opts ...BufferOption) (*Buffer, error)
type BufferAccessFrequencyEnum ¶
type BufferAccessFrequencyEnum int
const ( STATIC BufferAccessFrequencyEnum = iota STREAM DYNAMIC )
type BufferAccessNatureEnum ¶
type BufferAccessNatureEnum int
const ( DRAW BufferAccessNatureEnum = iota * 8 READ COPY )
type BufferOption ¶
type BufferOption func(opt *bufferOption)
func BufferAccessFrequency ¶
func BufferAccessFrequency(e BufferAccessFrequencyEnum) BufferOption
func BufferAccessNature ¶
func BufferAccessNature(e BufferAccessNatureEnum) BufferOption
func BufferElementArray ¶
func BufferElementArray() BufferOption
type Clear ¶
type Clear struct {
// contains filtered or unexported fields
}
func NewClear ¶
func NewClear(opts ...ClearOption) (*Clear, error)
type ClearOption ¶
type ClearOption func(*clearOption)
func ClearColor ¶
func ClearColor(r, g, b, a float32) ClearOption
func ClearDepth ¶
func ClearDepth() ClearOption
func ClearStencil ¶
func ClearStencil() ClearOption
type DrawOption ¶
type DrawOption func(*drawOption)
func DrawIndex ¶
func DrawIndex(index *Buffer) DrawOption
func DrawTexture ¶
func DrawTexture(texture *Texture, unit int) DrawOption
type Extensions ¶
type Extensions struct {
// contains filtered or unexported fields
}
func GetExtensions ¶
func GetExtensions() *Extensions
func (*Extensions) GL_ARB_geometry_shader4 ¶
func (extensions *Extensions) GL_ARB_geometry_shader4() bool
func (*Extensions) Has ¶
func (extensions *Extensions) Has(ext string) bool
type GeometryInputType ¶
type GeometryInputType uint32
const ( GEOM_IN_POINTS GeometryInputType = gl.POINTS GEOM_IN_LINES GeometryInputType = gl.LINES GEOM_IN_LINES_ADJACENCY GeometryInputType = gl.LINES_ADJACENCY_ARB GEOM_IN_TRIANGLES GeometryInputType = gl.TRIANGLES GEOM_IN_TRIANGLES_ADJACENCY GeometryInputType = gl.TRIANGLES_ADJACENCY_ARB )
type GeometryOutputType ¶
type GeometryOutputType uint32
const ( GEOM_OUT_POINTS GeometryOutputType = gl.POINTS GEOM_OUT_LINE_STRIP GeometryOutputType = gl.LINE_STRIP GEOM_OUT_TRIANGLE_STRIP GeometryOutputType = gl.TRIANGLE_STRIP )
type Program ¶
type Program struct {
// contains filtered or unexported fields
}
func NewProgram ¶
func NewProgram(vertexSource, fragmentSource string, opts ...ProgramOption) (_ *Program, rerr error)
type ProgramOption ¶
type ProgramOption func(opt *programOption)
func ProgramArbGeometryShader4 ¶
func ProgramArbGeometryShader4(source string, inType GeometryInputType, outType GeometryOutputType, numOutputVertices int) ProgramOption
type Texture ¶
type Texture struct {
// contains filtered or unexported fields
}
func NewTexture ¶
func NewTexture(img *image.RGBA, opts ...TextureOption) (*Texture, error)
type TextureFilterEnum ¶
type TextureFilterEnum uint32
const ( NEAREST TextureFilterEnum = gl.NEAREST LINEAR TextureFilterEnum = gl.LINEAR )
type TextureOption ¶
type TextureOption func(opt *textureOption)
func TextureFilter ¶
func TextureFilter(min, mag TextureFilterEnum) TextureOption
func TextureWrap ¶
func TextureWrap(wrap_s, wrap_t TextureWrapEnum) TextureOption
type TextureWrapEnum ¶
type TextureWrapEnum uint32
const ( CLAMP_TO_EDGE TextureWrapEnum = gl.CLAMP_TO_EDGE REPEAT TextureWrapEnum = gl.REPEAT MIRRORED_REPEAT TextureWrapEnum = gl.MIRRORED_REPEAT )
type Uniform ¶
type Uniform struct {
// contains filtered or unexported fields
}
func (Uniform) SetSampler ¶
Click to show internal directories.
Click to hide internal directories.