Documentation ¶
Index ¶
- Constants
- Variables
- func Disable(cap uint32, fn func())
- func Enable(cap uint32, fn func())
- type Buffer
- type BufferTarget
- type DbgSev
- type DbgSrc
- type DbgTyp
- type Program
- func (p Program) AttachShaders(s ...Shader)
- func (p Program) Delete()
- func (p Program) GetAttrib(name string) VertexAttrib
- func (p Program) GetUniform(name string) Uniform
- func (p Program) Getiv(name uint32) (v int32)
- func (p Program) InfoLog() string
- func (p Program) Link() error
- func (_ Program) Unuse()
- func (p Program) Use()
- type Ref
- type Shader
- type ShaderType
- type Texture
- type TextureTarget
- func (t TextureTarget) ID() uint32
- func (t TextureTarget) Image2D(level, internalformat, width, height, border int32, format, xtype uint32, ...)
- func (t TextureTarget) LoadImage2D(img image.Image, level, internalFormat, border int32)
- func (t TextureTarget) New() Texture
- func (t TextureTarget) Parameteri(name uint32, val int32)
- type Uniform
- func (u Uniform) As1f(a float32)
- func (u Uniform) As1fv(v ...float32)
- func (u Uniform) As1i(a int32)
- func (u Uniform) As1iv(v ...int32)
- func (u Uniform) As1ui(a uint32)
- func (u Uniform) As1uiv(v ...uint32)
- func (u Uniform) As2f(a, b float32)
- func (u Uniform) As2fv(v ...mgl32.Vec2)
- func (u Uniform) As2i(a, b int32)
- func (u Uniform) As2iv(v ...[2]int32)
- func (u Uniform) As2ui(a, b uint32)
- func (u Uniform) As2uiv(v ...[2]uint32)
- func (u Uniform) As3f(a, b, c float32)
- func (u Uniform) As3fv(v ...mgl32.Vec3)
- func (u Uniform) As3i(a, b, c int32)
- func (u Uniform) As3iv(v ...[3]int32)
- func (u Uniform) As3ui(a, b, c uint32)
- func (u Uniform) As3uiv(v ...[3]uint32)
- func (u Uniform) As4f(a, b, c, d float32)
- func (u Uniform) As4fv(v ...mgl32.Vec4)
- func (u Uniform) As4i(a, b, c, d int32)
- func (u Uniform) As4iv(v ...[4]int32)
- func (u Uniform) As4ui(a, b, c, d uint32)
- func (u Uniform) As4uiv(v ...[4]uint32)
- func (u Uniform) AsMatrix2fv(transpose bool, v ...mgl32.Mat2)
- func (u Uniform) AsMatrix2x3fv(transpose bool, v ...mgl32.Mat2x3)
- func (u Uniform) AsMatrix2x4fv(transpose bool, v ...mgl32.Mat2x4)
- func (u Uniform) AsMatrix3fv(transpose bool, v ...mgl32.Mat3)
- func (u Uniform) AsMatrix3x2fv(transpose bool, v ...mgl32.Mat3x2)
- func (u Uniform) AsMatrix3x4fv(transpose bool, v ...mgl32.Mat3x4)
- func (u Uniform) AsMatrix4fv(transpose bool, v ...mgl32.Mat4)
- func (u Uniform) AsMatrix4x2fv(transpose bool, v ...mgl32.Mat4x2)
- func (u Uniform) AsMatrix4x3fv(transpose bool, v ...mgl32.Mat4x3)
- type VertexArray
- type VertexAttrib
- func (a VertexAttrib) As1d(v0 float64)
- func (a VertexAttrib) As1dv(v [1]float64)
- func (a VertexAttrib) As1f(v0 float32)
- func (a VertexAttrib) As1fv(v [1]float32)
- func (a VertexAttrib) As1s(v0 int16)
- func (a VertexAttrib) As1sv(v [1]int16)
- func (a VertexAttrib) As2d(v0, v1 float64)
- func (a VertexAttrib) As2dv(v [2]float64)
- func (a VertexAttrib) As2f(v0, v1 float32)
- func (a VertexAttrib) As2fv(v [2]float32)
- func (a VertexAttrib) As2s(v0, v1 int16)
- func (a VertexAttrib) As2sv(v [2]int16)
- func (a VertexAttrib) As3d(v0, v1, v2 float64)
- func (a VertexAttrib) As3dv(v [3]float64)
- func (a VertexAttrib) As3f(v0, v1, v2 float32)
- func (a VertexAttrib) As3fv(v [3]float32)
- func (a VertexAttrib) As3s(v0, v1, v2 int16)
- func (a VertexAttrib) As3sv(v [3]int16)
- func (a VertexAttrib) As4Nbv(v [4]int8)
- func (a VertexAttrib) As4Niv(v [4]int32)
- func (a VertexAttrib) As4Nsv(v [4]int16)
- func (a VertexAttrib) As4Nub(v0, v1, v2, v3 uint8)
- func (a VertexAttrib) As4Nubv(v [4]uint8)
- func (a VertexAttrib) As4Nuiv(v [4]uint32)
- func (a VertexAttrib) As4Nusv(v [4]uint16)
- func (a VertexAttrib) As4bv(v [4]int8)
- func (a VertexAttrib) As4d(v0, v1, v2, v3 float64)
- func (a VertexAttrib) As4dv(v [4]float64)
- func (a VertexAttrib) As4f(v0, v1, v2, v3 float32)
- func (a VertexAttrib) As4fv(v [4]float32)
- func (a VertexAttrib) As4iv(v [4]int32)
- func (a VertexAttrib) As4s(v0, v1, v2, v3 int16)
- func (a VertexAttrib) As4sv(v [4]int16)
- func (a VertexAttrib) As4ubv(v [4]uint8)
- func (a VertexAttrib) As4uiv(v [4]uint32)
- func (a VertexAttrib) As4usv(v [4]uint16)
- func (a VertexAttrib) AsArray(size int32, xtype uint32, normalized bool, stride int32, ...)
- func (a VertexAttrib) AsI1i(v0 int32)
- func (a VertexAttrib) AsI1iv(v [1]int32)
- func (a VertexAttrib) AsI1ui(v0 uint32)
- func (a VertexAttrib) AsI1uiv(v [1]uint32)
- func (a VertexAttrib) AsI2i(v0, v1 int32)
- func (a VertexAttrib) AsI2iv(v [2]int32)
- func (a VertexAttrib) AsI2ui(v0, v1 uint32)
- func (a VertexAttrib) AsI2uiv(v [2]uint32)
- func (a VertexAttrib) AsI3i(v0, v1, v2 int32)
- func (a VertexAttrib) AsI3iv(v [3]int32)
- func (a VertexAttrib) AsI3ui(v0, v1, v2 uint32)
- func (a VertexAttrib) AsI3uiv(v [3]uint32)
- func (a VertexAttrib) AsI4bv(v [4]int8)
- func (a VertexAttrib) AsI4i(v0, v1, v2, v3 int32)
- func (a VertexAttrib) AsI4iv(v [4]int32)
- func (a VertexAttrib) AsI4sv(v [4]int16)
- func (a VertexAttrib) AsI4ubv(v [4]uint8)
- func (a VertexAttrib) AsI4ui(v0, v1, v2, v3 uint32)
- func (a VertexAttrib) AsI4uiv(v [4]uint32)
- func (a VertexAttrib) AsI4usv(v [4]uint16)
- func (a VertexAttrib) AsL1d(v0 float64)
- func (a VertexAttrib) AsL1dv(v [1]float64)
- func (a VertexAttrib) AsL2d(v0, v1 float64)
- func (a VertexAttrib) AsL2dv(v [2]float64)
- func (a VertexAttrib) AsL3d(v0, v1, v2 float64)
- func (a VertexAttrib) AsL3dv(v [3]float64)
- func (a VertexAttrib) AsL4d(v0, v1, v2, v3 float64)
- func (a VertexAttrib) AsL4dv(v [4]float64)
Constants ¶
View Source
const ( ArrayBuffer = BufferTarget(gl.ARRAY_BUFFER) // Vertex attributes AtomicCounterBuffer = BufferTarget(gl.ATOMIC_COUNTER_BUFFER) // Atomic counter storage CopyReadBuffer = BufferTarget(gl.COPY_READ_BUFFER) // Buffer copy source CopyWriteBuffer = BufferTarget(gl.COPY_WRITE_BUFFER) // Buffer copy destination DispatchIndirectBuffer = BufferTarget(gl.DISPATCH_INDIRECT_BUFFER) // Indirect compute dispatch commands DrawIndirectBuffer = BufferTarget(gl.DRAW_INDIRECT_BUFFER) // Indirect command arguments ElementArrayBuffer = BufferTarget(gl.ELEMENT_ARRAY_BUFFER) // Vertex array indices PixelPackBuffer = BufferTarget(gl.PIXEL_PACK_BUFFER) // Pixel read target PixelUnpackBuffer = BufferTarget(gl.PIXEL_UNPACK_BUFFER) // Texture data source QueryBuffer = BufferTarget(gl.QUERY_BUFFER) // Query result buffer ShaderStorageBuffer = BufferTarget(gl.SHADER_STORAGE_BUFFER) // Read-write storage for shaders TextureBuffer = BufferTarget(gl.TEXTURE_BUFFER) // Texture data buffer TransformFeedbackBuffer = BufferTarget(gl.TRANSFORM_FEEDBACK_BUFFER) // Transform feedback buffer UniformBuffer = BufferTarget(gl.UNIFORM_BUFFER) // Uniform block storage )
View Source
const ( Texture1D = TextureTarget(gl.TEXTURE_1D) Texture2D = TextureTarget(gl.TEXTURE_2D) Texture2DMultisample = TextureTarget(gl.TEXTURE_2D_MULTISAMPLE) Texture3D = TextureTarget(gl.TEXTURE_3D) TextureRectangle = TextureTarget(gl.TEXTURE_RECTANGLE) TextureCubeMap = TextureTarget(gl.TEXTURE_CUBE_MAP) Texture1DArray = TextureTarget(gl.TEXTURE_1D_ARRAY) Texture2DArray = TextureTarget(gl.TEXTURE_2D_ARRAY) TextureCubeMapArray = TextureTarget(gl.TEXTURE_CUBE_MAP_ARRAY) Texture2DMultisampleArray = TextureTarget(gl.TEXTURE_2D_MULTISAMPLE_ARRAY) TextureCubeMapPosX = TextureTarget(gl.TEXTURE_CUBE_MAP_POSITIVE_X) TextureCubeMapNegX = TextureTarget(gl.TEXTURE_CUBE_MAP_NEGATIVE_X) TextureCubeMapPosY = TextureTarget(gl.TEXTURE_CUBE_MAP_POSITIVE_Y) TextureCubeMapNegY = TextureTarget(gl.TEXTURE_CUBE_MAP_NEGATIVE_Y) TextureCubeMapPosZ = TextureTarget(gl.TEXTURE_CUBE_MAP_POSITIVE_Z) TextureCubeMapNegZ = TextureTarget(gl.TEXTURE_CUBE_MAP_NEGATIVE_Z) )
View Source
const ( ComputeShader = ShaderType(gl.COMPUTE_SHADER) VertexShader = ShaderType(gl.VERTEX_SHADER) TessControlShader = ShaderType(gl.TESS_CONTROL_SHADER) TessEvaluationShader = ShaderType(gl.TESS_EVALUATION_SHADER) GeometryShader = ShaderType(gl.GEOMETRY_SHADER) FragmentShader = ShaderType(gl.FRAGMENT_SHADER) )
View Source
const ( DbgSevHigh DbgSev = gl.DEBUG_SEVERITY_HIGH DbgSevMedium DbgSev = gl.DEBUG_SEVERITY_MEDIUM DbgSevLow DbgSev = gl.DEBUG_SEVERITY_LOW DbgSevNotification DbgSev = gl.DEBUG_SEVERITY_NOTIFICATION DbgSrcApi DbgSrc = gl.DEBUG_SOURCE_API DbgSrcWindowSystem DbgSrc = gl.DEBUG_SOURCE_WINDOW_SYSTEM DbgSrcShaderCompiler DbgSrc = gl.DEBUG_SOURCE_SHADER_COMPILER DbgSrcThirdParty DbgSrc = gl.DEBUG_SOURCE_THIRD_PARTY DbgSrcApplication DbgSrc = gl.DEBUG_SOURCE_APPLICATION DbgSrcOther DbgSrc = gl.DEBUG_SOURCE_OTHER DbgTypError DbgTyp = gl.DEBUG_TYPE_ERROR DbgTypDeprecatedBehavior DbgTyp = gl.DEBUG_TYPE_DEPRECATED_BEHAVIOR DbgTypUndefinedBehavior DbgTyp = gl.DEBUG_TYPE_UNDEFINED_BEHAVIOR DbgTypPortability DbgTyp = gl.DEBUG_TYPE_PORTABILITY DbgTypPerformance DbgTyp = gl.DEBUG_TYPE_PERFORMANCE DbgTypMarker DbgTyp = gl.DEBUG_TYPE_MARKER DbgTypPushGroup DbgTyp = gl.DEBUG_TYPE_PUSH_GROUP DbgTypPopGroup DbgTyp = gl.DEBUG_TYPE_POP_GROUP DbgTypOther DbgTyp = gl.DEBUG_TYPE_OTHER )
Variables ¶
Functions ¶
Types ¶
type Buffer ¶
type Buffer struct { Ref Target BufferTarget }
type BufferTarget ¶
type BufferTarget uint32
func (BufferTarget) ID ¶
func (b BufferTarget) ID() uint32
func (BufferTarget) New ¶
func (b BufferTarget) New() Buffer
func (BufferTarget) NewWith ¶
func (b BufferTarget) NewWith(data interface{}, usage uint32) Buffer
type Program ¶
type Program struct{ Ref }
func BuildShaderProgram ¶
func BuildShaderProgram(source map[ShaderType]string) (Program, error)
func NewProgram ¶
func NewProgram() Program
func (Program) AttachShaders ¶
func (Program) GetAttrib ¶
func (p Program) GetAttrib(name string) VertexAttrib
func (Program) GetUniform ¶
type ShaderType ¶
type ShaderType uint32
func (ShaderType) ID ¶
func (s ShaderType) ID() uint32
func (ShaderType) New ¶
func (s ShaderType) New() Shader
type Texture ¶
type Texture struct { Ref Target TextureTarget }
type TextureTarget ¶
type TextureTarget uint32
func (TextureTarget) ID ¶
func (t TextureTarget) ID() uint32
func (TextureTarget) Image2D ¶
func (t TextureTarget) Image2D(level, internalformat, width, height, border int32, format, xtype uint32, pixels unsafe.Pointer)
func (TextureTarget) LoadImage2D ¶
func (t TextureTarget) LoadImage2D(img image.Image, level, internalFormat, border int32)
func (TextureTarget) New ¶
func (t TextureTarget) New() Texture
func (TextureTarget) Parameteri ¶
func (t TextureTarget) Parameteri(name uint32, val int32)
type VertexArray ¶
type VertexArray struct{ Ref }
func NewVertexArray ¶
func NewVertexArray() VertexArray
func (VertexArray) Bind ¶
func (a VertexArray) Bind()
func (VertexArray) Delete ¶
func (a VertexArray) Delete()
func (VertexArray) Disable ¶
func (a VertexArray) Disable(b ...VertexAttrib)
func (VertexArray) Enable ¶
func (a VertexArray) Enable(b ...VertexAttrib)
func (VertexArray) Unbind ¶
func (_ VertexArray) Unbind()
type VertexAttrib ¶
type VertexAttrib struct{ Ref }
func (VertexAttrib) As1d ¶
func (a VertexAttrib) As1d(v0 float64)
func (VertexAttrib) As1dv ¶
func (a VertexAttrib) As1dv(v [1]float64)
func (VertexAttrib) As1f ¶
func (a VertexAttrib) As1f(v0 float32)
func (VertexAttrib) As1fv ¶
func (a VertexAttrib) As1fv(v [1]float32)
func (VertexAttrib) As1s ¶
func (a VertexAttrib) As1s(v0 int16)
func (VertexAttrib) As1sv ¶
func (a VertexAttrib) As1sv(v [1]int16)
func (VertexAttrib) As2d ¶
func (a VertexAttrib) As2d(v0, v1 float64)
func (VertexAttrib) As2dv ¶
func (a VertexAttrib) As2dv(v [2]float64)
func (VertexAttrib) As2f ¶
func (a VertexAttrib) As2f(v0, v1 float32)
func (VertexAttrib) As2fv ¶
func (a VertexAttrib) As2fv(v [2]float32)
func (VertexAttrib) As2s ¶
func (a VertexAttrib) As2s(v0, v1 int16)
func (VertexAttrib) As2sv ¶
func (a VertexAttrib) As2sv(v [2]int16)
func (VertexAttrib) As3d ¶
func (a VertexAttrib) As3d(v0, v1, v2 float64)
func (VertexAttrib) As3dv ¶
func (a VertexAttrib) As3dv(v [3]float64)
func (VertexAttrib) As3f ¶
func (a VertexAttrib) As3f(v0, v1, v2 float32)
func (VertexAttrib) As3fv ¶
func (a VertexAttrib) As3fv(v [3]float32)
func (VertexAttrib) As3s ¶
func (a VertexAttrib) As3s(v0, v1, v2 int16)
func (VertexAttrib) As3sv ¶
func (a VertexAttrib) As3sv(v [3]int16)
func (VertexAttrib) As4Nbv ¶
func (a VertexAttrib) As4Nbv(v [4]int8)
func (VertexAttrib) As4Niv ¶
func (a VertexAttrib) As4Niv(v [4]int32)
func (VertexAttrib) As4Nsv ¶
func (a VertexAttrib) As4Nsv(v [4]int16)
func (VertexAttrib) As4Nub ¶
func (a VertexAttrib) As4Nub(v0, v1, v2, v3 uint8)
func (VertexAttrib) As4Nubv ¶
func (a VertexAttrib) As4Nubv(v [4]uint8)
func (VertexAttrib) As4Nuiv ¶
func (a VertexAttrib) As4Nuiv(v [4]uint32)
func (VertexAttrib) As4Nusv ¶
func (a VertexAttrib) As4Nusv(v [4]uint16)
func (VertexAttrib) As4bv ¶
func (a VertexAttrib) As4bv(v [4]int8)
func (VertexAttrib) As4d ¶
func (a VertexAttrib) As4d(v0, v1, v2, v3 float64)
func (VertexAttrib) As4dv ¶
func (a VertexAttrib) As4dv(v [4]float64)
func (VertexAttrib) As4f ¶
func (a VertexAttrib) As4f(v0, v1, v2, v3 float32)
func (VertexAttrib) As4fv ¶
func (a VertexAttrib) As4fv(v [4]float32)
func (VertexAttrib) As4iv ¶
func (a VertexAttrib) As4iv(v [4]int32)
func (VertexAttrib) As4s ¶
func (a VertexAttrib) As4s(v0, v1, v2, v3 int16)
func (VertexAttrib) As4sv ¶
func (a VertexAttrib) As4sv(v [4]int16)
func (VertexAttrib) As4ubv ¶
func (a VertexAttrib) As4ubv(v [4]uint8)
func (VertexAttrib) As4uiv ¶
func (a VertexAttrib) As4uiv(v [4]uint32)
func (VertexAttrib) As4usv ¶
func (a VertexAttrib) As4usv(v [4]uint16)
func (VertexAttrib) AsI1i ¶
func (a VertexAttrib) AsI1i(v0 int32)
func (VertexAttrib) AsI1iv ¶
func (a VertexAttrib) AsI1iv(v [1]int32)
func (VertexAttrib) AsI1ui ¶
func (a VertexAttrib) AsI1ui(v0 uint32)
func (VertexAttrib) AsI1uiv ¶
func (a VertexAttrib) AsI1uiv(v [1]uint32)
func (VertexAttrib) AsI2i ¶
func (a VertexAttrib) AsI2i(v0, v1 int32)
func (VertexAttrib) AsI2iv ¶
func (a VertexAttrib) AsI2iv(v [2]int32)
func (VertexAttrib) AsI2ui ¶
func (a VertexAttrib) AsI2ui(v0, v1 uint32)
func (VertexAttrib) AsI2uiv ¶
func (a VertexAttrib) AsI2uiv(v [2]uint32)
func (VertexAttrib) AsI3i ¶
func (a VertexAttrib) AsI3i(v0, v1, v2 int32)
func (VertexAttrib) AsI3iv ¶
func (a VertexAttrib) AsI3iv(v [3]int32)
func (VertexAttrib) AsI3ui ¶
func (a VertexAttrib) AsI3ui(v0, v1, v2 uint32)
func (VertexAttrib) AsI3uiv ¶
func (a VertexAttrib) AsI3uiv(v [3]uint32)
func (VertexAttrib) AsI4bv ¶
func (a VertexAttrib) AsI4bv(v [4]int8)
func (VertexAttrib) AsI4i ¶
func (a VertexAttrib) AsI4i(v0, v1, v2, v3 int32)
func (VertexAttrib) AsI4iv ¶
func (a VertexAttrib) AsI4iv(v [4]int32)
func (VertexAttrib) AsI4sv ¶
func (a VertexAttrib) AsI4sv(v [4]int16)
func (VertexAttrib) AsI4ubv ¶
func (a VertexAttrib) AsI4ubv(v [4]uint8)
func (VertexAttrib) AsI4ui ¶
func (a VertexAttrib) AsI4ui(v0, v1, v2, v3 uint32)
func (VertexAttrib) AsI4uiv ¶
func (a VertexAttrib) AsI4uiv(v [4]uint32)
func (VertexAttrib) AsI4usv ¶
func (a VertexAttrib) AsI4usv(v [4]uint16)
func (VertexAttrib) AsL1d ¶
func (a VertexAttrib) AsL1d(v0 float64)
func (VertexAttrib) AsL1dv ¶
func (a VertexAttrib) AsL1dv(v [1]float64)
func (VertexAttrib) AsL2d ¶
func (a VertexAttrib) AsL2d(v0, v1 float64)
func (VertexAttrib) AsL2dv ¶
func (a VertexAttrib) AsL2dv(v [2]float64)
func (VertexAttrib) AsL3d ¶
func (a VertexAttrib) AsL3d(v0, v1, v2 float64)
func (VertexAttrib) AsL3dv ¶
func (a VertexAttrib) AsL3dv(v [3]float64)
func (VertexAttrib) AsL4d ¶
func (a VertexAttrib) AsL4d(v0, v1, v2, v3 float64)
func (VertexAttrib) AsL4dv ¶
func (a VertexAttrib) AsL4dv(v [4]float64)
Click to show internal directories.
Click to hide internal directories.