Documentation
¶
Overview ¶
Package noodle is a WebGL game engine, designed for low level access for fast and efficent 3D applications
Index ¶
- Constants
- Variables
- func AddEventListener(event string, fn func(this js.Value, args []js.Value) interface{}) js.Func
- func Clamp(v float64, min float64, max float64) float64
- func Clamp32(v float32, min float32, max float32) float32
- func DT() float32
- func DownloadFile(url string) ([]byte, error)
- func DownloadString(url string) (string, error)
- func Exit()
- func Float32frombits(b uint32) float32
- func GetDeltaTime() float64
- func GetFrameCount() int64
- func GetFrameTime() float64
- func Height() int
- func Inf(sign int) float32
- func NaN32() float32
- func RequestRedraw()
- func Run(application Application) int
- func SetCanvasSize(w, h int)
- func Width() int
- type Application
- type Color
- type Font
- type FontKerner
- type GLEnum
- type Glyph
- type GlyphString
- type Image
- type InputHandler
- func (i *InputHandler) GetAxis(negativeKey, positiveKey Key) float32
- func (i *InputHandler) GetAxis2D(negHorizontalKey, posHorizontalKey, negVerticalKey, posVerticalKey Key) Vector2
- func (i *InputHandler) GetButton(button int) bool
- func (i *InputHandler) GetButtonDown(button int) bool
- func (i *InputHandler) GetButtonUp(button int) bool
- func (i *InputHandler) GetKey(key Key) bool
- func (i *InputHandler) GetKeyDown(key Key) bool
- func (i *InputHandler) GetKeyUp(key Key) bool
- func (i *InputHandler) GetMousePosition() Vector2
- func (i *InputHandler) GetMouseScroll() float32
- func (i *InputHandler) GetMouseX() int
- func (i *InputHandler) GetMouseY() int
- type Key
- type Matrix
- func NewMatrixFrustum(left, right, bottom, top, near, far float32) Matrix
- func NewMatrixIdentity() Matrix
- func NewMatrixLookAt(eye, target, up Vector3) Matrix
- func NewMatrixOrtho(left, right, bottom, top, near, far float32) Matrix
- func NewMatrixPerspective(fovy, aspect, near, far float32) Matrix
- func NewMatrixQuaternion(q Quaternion) Matrix
- func NewMatrixRotate(axis Vector3, radians float32) Matrix
- func NewMatrixRotateX(radians float32) Matrix
- func NewMatrixRotateXYZ(radians Vector3) Matrix
- func NewMatrixRotateY(radians float32) Matrix
- func NewMatrixRotateZ(radians float32) Matrix
- func NewMatrixScale(scale Vector3) Matrix
- func NewMatrixTransform(transform Transform) Matrix
- func NewMatrixTranslate(v Vector3) Matrix
- func NewMatrixTranslate32(x, y, z float32) Matrix
- func NewMatrixTranslate64(x, y, z float64) Matrix
- func (m Matrix) Add(right Matrix) Matrix
- func (m Matrix) Decompose() []float32
- func (m *Matrix) DecomposePointer() *[16]float32
- func (m Matrix) Detrimant() float32
- func (m Matrix) Invert() Matrix
- func (m Matrix) Multiply(right Matrix) Matrix
- func (m Matrix) Normalize() Matrix
- func (m Matrix) Subtract(right Matrix) Matrix
- func (m Matrix) Trace() float32
- func (m Matrix) Transpose() Matrix
- type Quaternion
- func NewQuaternionAxisAngle(axis Vector3, angle float32) Quaternion
- func NewQuaternionBetweenVectors(start, dest Vector3) Quaternion
- func NewQuaternionEuler(euler Vector3) Quaternion
- func NewQuaternionIdentity() Quaternion
- func NewQuaternionLookAt(eye, center, up Vector3) Quaternion
- func NewQuaternionMatrix(matrix Matrix) Quaternion
- func (q Quaternion) Backward() Vector3
- func (q Quaternion) Decompose() []float32
- func (q Quaternion) Down() Vector3
- func (q Quaternion) Forward() Vector3
- func (q Quaternion) Inverse() Quaternion
- func (q Quaternion) Left() Vector3
- func (q Quaternion) Length() float32
- func (q Quaternion) Lerp(target Quaternion, amount float32) Quaternion
- func (q Quaternion) Multiply(q2 Quaternion) Quaternion
- func (q Quaternion) Nlerp(target Quaternion, amount float32) Quaternion
- func (q Quaternion) Normalize() Quaternion
- func (q Quaternion) Right() Vector3
- func (q Quaternion) Rotate(v Vector3) Vector3
- func (q Quaternion) Scale(scale float32) Quaternion
- func (q Quaternion) Slerp(q2 Quaternion, amount float32) Quaternion
- func (q Quaternion) SqrLength() float32
- func (q Quaternion) ToAxisAngle() (Vector3, float32)
- func (q Quaternion) ToEuler() Vector3
- func (q Quaternion) ToMatrix() Matrix
- func (q Quaternion) Up() Vector3
- type Rectangle
- func NewRectangle(x, y, width, height float32) Rectangle
- func NewRectangleFromMinMax(min Vector2, max Vector2) Rectangle
- func NewRectangleFromPositionSize(position, size Vector2) Rectangle
- func NewRectangleFromVector4(vector Vector4) Rectangle
- func NewRectangled(x, y, width, height float64) Rectangle
- func (r Rectangle) Center() Vector2
- func (r Rectangle) Grow(x, y float32) Rectangle
- func (r Rectangle) GrowV(v Vector2) Rectangle
- func (r Rectangle) Lerp(target Rectangle, amount float32) Rectangle
- func (r Rectangle) LerpPosition(pos Vector2, amount float32) Rectangle
- func (r Rectangle) MaxPosition() Vector2
- func (r Rectangle) MinPosition() Vector2
- func (r Rectangle) Move(x, y float32) Rectangle
- func (r Rectangle) MoveV(v Vector2) Rectangle
- func (r Rectangle) Position() Vector2
- func (r Rectangle) Scale(scale float32) Rectangle
- func (r Rectangle) SetPosition(v Vector2) Rectangle
- func (r Rectangle) SetSize(v Vector2) Rectangle
- func (r Rectangle) Size() Vector2
- func (r Rectangle) ToVector4() Vector4
- type Shader
- func (shader *Shader) BindVertexData(attribute string, bufferLocation GLEnum, buffer WebGLBuffer, bufferSize int, ...)
- func (shader *Shader) GetAttribLocation(attribute string) WebGLAttributeLocation
- func (shader *Shader) GetProgram() WebGLShaderProgram
- func (shader *Shader) GetUniformLocation(location string) WebGLUniformLocation
- func (shader *Shader) Use()
- type SliceSprite
- type Sprite
- type SpriteRenderer
- type Texture
- func (tex *Texture) Bind()
- func (tex *Texture) CreateSprite(region Rectangle) *Sprite
- func (tex *Texture) Data() WebGLTexture
- func (tex *Texture) Height() int
- func (tex *Texture) SetFilter(filter TextureFilter)
- func (tex *Texture) SetImage(image *Image)
- func (tex *Texture) SetSampler(sampler WebGLUniformLocation, textureIndex int)
- func (tex *Texture) SetWrap(wrap TextureWrap)
- func (tex *Texture) Slice() (Vector2, Vector2)
- func (tex *Texture) Texture() *Texture
- func (tex *Texture) Width() int
- type TextureFilter
- type TextureWrap
- type Transform
- type Transform2D
- type UIRenderer
- func (b *UIRenderer) Begin() *UIRenderer
- func (b *UIRenderer) Draw(rect Rectangle, color Color)
- func (b *UIRenderer) End() *UIRenderer
- func (b *UIRenderer) GetScale() float32
- func (b *UIRenderer) ScaleInput(state bool)
- func (b *UIRenderer) Screen2UISpace(screen Vector2) Vector2
- func (b *UIRenderer) SetScale(scale float32)
- func (b *UIRenderer) SetSprite(sprite *SliceSprite)
- type UVTile
- type Vector
- type Vector2
- func (v Vector2) Add(v2 Vector2) Vector2
- func (v Vector2) Angle(v2 Vector2) float32
- func (v Vector2) Decompose() []float32
- func (v Vector2) DecomposePointer() *[2]float32
- func (v Vector2) Distance(v2 Vector2) float32
- func (v Vector2) Divide(d float32) Vector2
- func (v Vector2) DivideV(v2 Vector2) Vector2
- func (v Vector2) DotProduct(v2 Vector2) float32
- func (v Vector2) Length() float32
- func (v Vector2) Lerp(target Vector2, amount float32) Vector2
- func (v Vector2) Max(v2 Vector2) Vector2
- func (v Vector2) Min(v2 Vector2) Vector2
- func (v Vector2) Multiply(v2 Vector2) Vector2
- func (v Vector2) Negate() Vector2
- func (v Vector2) Normalize() Vector2
- func (v Vector2) Perpendicular() Vector2
- func (v Vector2) Reflect(mirrorNormal Vector2) Vector2
- func (v Vector2) RotateByRadians(radians float32) Vector2
- func (v Vector2) Scale(scale float32) Vector2
- func (v Vector2) SqrLength() float32
- func (v Vector2) Subtract(v2 Vector2) Vector2
- func (v Vector2) ToVector3() Vector3
- type Vector3
- func (v Vector3) Add(v2 Vector3) Vector3
- func (v Vector3) Angle(v2 Vector3) float32
- func (v Vector3) Barycenter(a, b, c Vector3) Vector3
- func (v Vector3) CrossProduct(other Vector3) Vector3
- func (v Vector3) Decompose() []float32
- func (v Vector3) DecomposePointer() *[3]float32
- func (v Vector3) Distance(v2 Vector3) float32
- func (v Vector3) Divide(d float32) Vector3
- func (v Vector3) DivideV(v2 Vector3) Vector3
- func (v Vector3) DotProduct(v2 Vector3) float32
- func (v Vector3) Length() float32
- func (v Vector3) Lerp(target Vector3, amount float32) Vector3
- func (v Vector3) Max(v2 Vector3) Vector3
- func (v Vector3) Min(v2 Vector3) Vector3
- func (v Vector3) Multiply(v2 Vector3) Vector3
- func (v Vector3) Negate() Vector3
- func (v Vector3) Normalize() Vector3
- func (v *Vector3) OrthoNormalize(v2 *Vector3)
- func (v Vector3) Perpendicular() Vector3
- func (v Vector3) Reflect(mirrorNormal Vector3) Vector3
- func (v Vector3) Rotate(q Quaternion) Vector3
- func (v Vector3) Scale(scale float32) Vector3
- func (v Vector3) SqrLength() float32
- func (v Vector3) Subtract(v2 Vector3) Vector3
- func (v Vector3) ToVector4() Vector4
- func (v Vector3) Transform(m Matrix) Vector3
- type Vector4
- func (v Vector4) Add(v2 Vector4) Vector4
- func (v Vector4) Decompose() []float32
- func (v Vector4) DecomposePointer() *[4]float32
- func (v Vector4) Distance(v2 Vector4) float32
- func (v Vector4) Divide(d float32) Vector4
- func (v Vector4) DivideV(v2 Vector4) Vector4
- func (v Vector4) DotProduct(v2 Vector4) float32
- func (v Vector4) Length() float32
- func (v Vector4) Lerp(target Vector4, amount float32) Vector4
- func (v Vector4) Max(v2 Vector4) Vector4
- func (v Vector4) Min(v2 Vector4) Vector4
- func (v Vector4) Multiply(v2 Vector4) Vector4
- func (v Vector4) Negate() Vector4
- func (v Vector4) Normalize() Vector4
- func (v Vector4) Scale(scale float32) Vector4
- func (v Vector4) SqrLength() float32
- func (v Vector4) Subtract(v2 Vector4) Vector4
- type WebGL
- func (gl *WebGL) ActiveTexture(target GLEnum)
- func (gl *WebGL) AttachShader(shaderProgram WebGLShaderProgram, shader WebGLShader)
- func (gl *WebGL) BindBuffer(target GLEnum, buffer WebGLBuffer)
- func (gl *WebGL) BindTexture(target GLEnum, texture WebGLTexture)
- func (gl *WebGL) BlendFunc(sFactor GLEnum, gFactor GLEnum)
- func (gl *WebGL) BufferData(target GLEnum, data interface{}, usage GLEnum)
- func (gl *WebGL) BufferSubData(target GLEnum, offset int, data interface{})
- func (gl *WebGL) Call(m string, args ...interface{}) js.Value
- func (gl *WebGL) Clear(option GLEnum)
- func (gl *WebGL) ClearColor(r, g, b, a float64)
- func (gl *WebGL) ClearDepth(depth float64)
- func (gl *WebGL) CompileShader(shader WebGLShader) error
- func (gl *WebGL) CreateBuffer() WebGLBuffer
- func (gl *WebGL) CreateProgram() WebGLShaderProgram
- func (gl *WebGL) CreateShader(shaderType GLEnum) WebGLShader
- func (gl *WebGL) CreateTexture() WebGLTexture
- func (gl *WebGL) DeleteShader(shader WebGLShader)
- func (gl *WebGL) DepthFunc(function GLEnum)
- func (gl *WebGL) Disable(option GLEnum)
- func (gl *WebGL) DrawElements(mode GLEnum, count int, valueType GLEnum, offset int)
- func (gl *WebGL) Enable(option GLEnum)
- func (gl *WebGL) EnableVertexAttribArray(position WebGLAttributeLocation)
- func (gl *WebGL) GenerateMipmap(target GLEnum)
- func (gl *WebGL) GetAttribLocation(shaderProgram WebGLShaderProgram, attribute string) WebGLAttributeLocation
- func (gl *WebGL) GetProgramInfoLog(shaderProgram WebGLShaderProgram) string
- func (gl *WebGL) GetProgramParameter(shaderProgram WebGLShaderProgram, param GLEnum) js.Value
- func (gl *WebGL) GetShaderInfoLog(shader WebGLShader) string
- func (gl *WebGL) GetShaderParameter(shader WebGLShader, param GLEnum) js.Value
- func (gl *WebGL) GetUniformLocation(shaderProgram WebGLShaderProgram, location string) WebGLUniformLocation
- func (gl *WebGL) IsUndefined() bool
- func (gl *WebGL) LinkProgram(shaderProgram WebGLShaderProgram) error
- func (gl *WebGL) NewBuffer(target GLEnum, data interface{}, usage GLEnum) WebGLBuffer
- func (gl *WebGL) NewProgram(shaders []WebGLShader) (WebGLShaderProgram, error)
- func (gl *WebGL) NewShader(shaderType GLEnum, sourceCode string) (WebGLShader, error)
- func (gl *WebGL) ShaderSource(shader WebGLShader, source string)
- func (gl *WebGL) TexImage2D(target GLEnum, level int, internalFormat GLEnum, format GLEnum, ...)
- func (gl *WebGL) TexParameterf(target GLEnum, param GLEnum, value float64)
- func (gl *WebGL) TexParameteri(target GLEnum, param GLEnum, value int)
- func (gl *WebGL) UnbindTexture(target GLEnum)
- func (gl *WebGL) Uniform1f(location WebGLUniformLocation, value float32)
- func (gl *WebGL) Uniform1fv(location WebGLUniformLocation, value []float32)
- func (gl *WebGL) Uniform1i(location WebGLUniformLocation, value int)
- func (gl *WebGL) Uniform1iv(location WebGLUniformLocation, value []int)
- func (gl *WebGL) Uniform2f(location WebGLUniformLocation, value, value2 float32)
- func (gl *WebGL) Uniform2fv(location WebGLUniformLocation, value []float32)
- func (gl *WebGL) Uniform2i(location WebGLUniformLocation, value, value2 int)
- func (gl *WebGL) Uniform2iv(location WebGLUniformLocation, value []int)
- func (gl *WebGL) Uniform2v(location WebGLUniformLocation, value Vector2)
- func (gl *WebGL) UniformMatrix4fv(location WebGLUniformLocation, matrix Matrix)
- func (gl *WebGL) UseProgram(shaderProgram WebGLShaderProgram)
- func (gl *WebGL) VertexAttribPointer(position WebGLAttributeLocation, size int, valueType GLEnum, normalized bool, ...)
- func (gl *WebGL) Viewport(x, y, width, height int)
- type WebGLAttributeLocation
- type WebGLBuffer
- type WebGLShader
- type WebGLShaderProgram
- type WebGLTexture
- type WebGLUniformLocation
Constants ¶
const ( //CharacterSetCompleteASCII is the complete ascii charset CharacterSetCompleteASCII = "" /* 741-byte string literal not displayed */ //CharacterSetASCII provides standard printable ASCII characters CharacterSetASCII = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" )
const ( // GlDepthBufferBit passed to <code>clear</code> to clear the current depth buffer. GlDepthBufferBit GLEnum = 0x00000100 // GlStencilBufferBit passed to <code>clear</code> to clear the current stencil buffer. GlStencilBufferBit = 0x00000400 // GlColorBufferBit passed to <code>clear</code> to clear the current color buffer. GlColorBufferBit = 0x00004000 // GlPoints passed to <code>drawelements</code> or <code>drawarrays</code> to draw single points. GlPoints = 0x0000 // GlLines passed to <code>drawelements</code> or <code>drawarrays</code> to draw lines. each vertex connects to the one after it. GlLines = 0x0001 // GlLineLoop passed to <code>drawelements</code> or <code>drawarrays</code> to draw lines. each set of two vertices is treated as a separate line segment. GlLineLoop = 0x0002 // GlLineStrip passed to <code>drawelements</code> or <code>drawarrays</code> to draw a connected group of line segments from the first vertex to the last. GlLineStrip = 0x0003 // GlTriangles passed to <code>drawelements</code> or <code>drawarrays</code> to draw triangles. each set of three vertices creates a separate triangle. GlTriangles = 0x0004 // GlTriangleStrip passed to <code>drawelements</code> or <code>drawarrays</code> to draw a connected group of triangles. GlTriangleStrip = 0x0005 // GlTriangleFan passed to <code>drawelements</code> or <code>drawarrays</code> to draw a connected group of triangles. each vertex connects to the previous and the first vertex in the fan. GlTriangleFan = 0x0006 // GlZero passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to turn off a component. GlZero = 0 // GlOne passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to turn on a component. GlOne = 1 // GlSrcColor passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to multiply a component by the source elements color. GlSrcColor = 0x0300 // GlOneMinusSrcColor passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to multiply a component by one minus the source elements color. GlOneMinusSrcColor = 0x0301 // GlSrcAlpha passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to multiply a component by the source's alpha. GlSrcAlpha = 0x0302 // GlOneMinusSrcAlpha passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to multiply a component by one minus the source's alpha. GlOneMinusSrcAlpha = 0x0303 // GlDstAlpha passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to multiply a component by the destination's alpha. GlDstAlpha = 0x0304 // GlOneMinusDstAlpha passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to multiply a component by one minus the destination's alpha. GlOneMinusDstAlpha = 0x0305 // GlDstColor passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to multiply a component by the destination's color. GlDstColor = 0x0306 // GlOneMinusDstColor passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to multiply a component by one minus the destination's color. GlOneMinusDstColor = 0x0307 // GlSrcAlphaSaturate passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to multiply a component by the minimum of source's alpha or one minus the destination's alpha. GlSrcAlphaSaturate = 0x0308 // GlConstantColor passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to specify a constant color blend function. GlConstantColor = 0x8001 // GlOneMinusConstantColor passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to specify one minus a constant color blend function. GlOneMinusConstantColor = 0x8002 // GlConstantAlpha passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to specify a constant alpha blend function. GlConstantAlpha = 0x8003 // GlOneMinusConstantAlpha passed to <code>blendfunc</code> or <code>blendfuncseparate</code> to specify one minus a constant alpha blend function. GlOneMinusConstantAlpha = 0x8004 // GlFuncAdd passed to <code>blendequation</code> or <code>blendequationseparate</code> to set an addition blend function. GlFuncAdd = 0x8006 // GlFuncSubtract passed to <code>blendequation</code> or <code>blendequationseparate</code> to specify a subtraction blend function (source - destination). GlFuncSubtract = 0x800a // GlFuncReverseSubtract passed to <code>blendequation</code> or <code>blendequationseparate</code> to specify a reverse subtraction blend function (destination - source). GlFuncReverseSubtract = 0x800b // GlBlendEquation passed to <code>getparameter</code> to get the current rgb blend function. GlBlendEquation = 0x8009 // GlBlendEquationRgb passed to <code>getparameter</code> to get the current rgb blend function. same as blendEquation GlBlendEquationRgb = 0x8009 // GlBlendEquationAlpha passed to <code>getparameter</code> to get the current alpha blend function. same as blendEquation GlBlendEquationAlpha = 0x883d // GlBlendDstRgb passed to <code>getparameter</code> to get the current destination rgb blend function. GlBlendDstRgb = 0x80c8 // GlBlendSrcRgb passed to <code>getparameter</code> to get the current destination rgb blend function. GlBlendSrcRgb = 0x80c9 // GlBlendDstAlpha passed to <code>getparameter</code> to get the current destination alpha blend function. GlBlendDstAlpha = 0x80ca // GlBlendSrcAlpha passed to <code>getparameter</code> to get the current source alpha blend function. GlBlendSrcAlpha = 0x80cb // GlBlendColor passed to <code>getparameter</code> to return a the current blend color. GlBlendColor = 0x8005 // GlArrayBufferBinding passed to <code>getparameter</code> to get the array buffer binding. GlArrayBufferBinding = 0x8894 // GlElementArrayBufferBinding passed to <code>getparameter</code> to get the current element array buffer. GlElementArrayBufferBinding = 0x8895 // GlLineWidth passed to <code>getparameter</code> to get the current <code>linewidth</code> (set by the <code>linewidth</code> method). GlLineWidth = 0x0b21 // GlAliasedPointSizeRange passed to <code>getparameter</code> to get the current size of a point drawn with <code>gl.points</code> GlAliasedPointSizeRange = 0x846d // GlAliasedLineWidthRange passed to <code>getparameter</code> to get the range of available widths for a line. returns a length-2 array with the lo value at 0, and hight at 1. GlAliasedLineWidthRange = 0x846e // GlCullFaceMode passed to <code>getparameter</code> to get the current value of <code>cullface</code>. should return <code>front</code>, <code>back</code>, or <code>frontAndBack</code> GlCullFaceMode = 0x0b45 // GlFrontFace passed to <code>getparameter</code> to determine the current value of <code>frontface</code>. should return <code>cw</code> or <code>ccw</code>. GlFrontFace = 0x0b46 // GlDepthRange passed to <code>getparameter</code> to return a length-2 array of floats giving the current depth range. GlDepthRange = 0x0b70 // GlDepthWritemask passed to <code>getparameter</code> to determine if the depth write mask is enabled. GlDepthWritemask = 0x0b72 // GlDepthClearValue passed to <code>getparameter</code> to determine the current depth clear value. GlDepthClearValue = 0x0b73 // GlDepthFunc passed to <code>getparameter</code> to get the current depth function. returns <code>never</code>, <code>always</code>, <code>less</code>, <code>equal</code>, <code>lequal</code>, <code>greater</code>, <code>gequal</code>, or <code>notequal</code>. GlDepthFunc = 0x0b74 // GlStencilClearValue passed to <code>getparameter</code> to get the value the stencil will be cleared to. GlStencilClearValue = 0x0b91 // GlStencilFunc passed to <code>getparameter</code> to get the current stencil function. returns <code>never</code>, <code>always</code>, <code>less</code>, <code>equal</code>, <code>lequal</code>, <code>greater</code>, <code>gequal</code>, or <code>notequal</code>. GlStencilFunc = 0x0b92 // GlStencilFail passed to <code>getparameter</code> to get the current stencil fail function. should return <code>keep</code>, <code>replace</code>, <code>incr</code>, <code>decr</code>, <code>invert</code>, <code>incrWrap</code>, or <code>decrWrap</code>. GlStencilFail = 0x0b94 // GlStencilPassDepthFail passed to <code>getparameter</code> to get the current stencil fail function should the depth buffer test fail. should return <code>keep</code>, <code>replace</code>, <code>incr</code>, <code>decr</code>, <code>invert</code>, <code>incrWrap</code>, or <code>decrWrap</code>. GlStencilPassDepthFail = 0x0b95 // GlStencilPassDepthPass passed to <code>getparameter</code> to get the current stencil fail function should the depth buffer test pass. should return keep, replace, incr, decr, invert, incrWrap, or decrWrap. GlStencilPassDepthPass = 0x0b96 // GlStencilRef passed to <code>getparameter</code> to get the reference value used for stencil tests. GlStencilRef = 0x0b97 // GlStencilValueMask GlStencilValueMask = 0x0b93 // GlStencilWritemask GlStencilWritemask = 0x0b98 // GlStencilBackFunc GlStencilBackFunc = 0x8800 // GlStencilBackFail GlStencilBackFail = 0x8801 // GlStencilBackPassDepthFail GlStencilBackPassDepthFail = 0x8802 // GlStencilBackPassDepthPass GlStencilBackPassDepthPass = 0x8803 // GlStencilBackRef GlStencilBackRef = 0x8ca3 // GlStencilBackValueMask GlStencilBackValueMask = 0x8ca4 // GlStencilBackWritemask GlStencilBackWritemask = 0x8ca5 // GlViewport returns an <a href="/en-us/docs/web/javascript/reference/globalObjects/int32array" title="the int32array typed array represents an array of twos-complement 32-bit signed integers in the platform byte order. if control over byte order is needed, use dataview instead. the contents are initialized to 0. once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation)."><code>int32array</code></a> with four elements for the current viewport dimensions. GlViewport = 0x0ba2 // GlScissorBox returns an <a href="/en-us/docs/web/javascript/reference/globalObjects/int32array" title="the int32array typed array represents an array of twos-complement 32-bit signed integers in the platform byte order. if control over byte order is needed, use dataview instead. the contents are initialized to 0. once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation)."><code>int32array</code></a> with four elements for the current scissor box dimensions. GlScissorBox = 0x0c10 // GlColorClearValue GlColorClearValue = 0x0c22 // GlColorWritemask GlColorWritemask = 0x0c23 // GlUnpackAlignment GlUnpackAlignment = 0x0cf5 // GlPackAlignment GlPackAlignment = 0x0d05 // GlMaxTextureSize GlMaxTextureSize = 0x0d33 // GlMaxViewportDims GlMaxViewportDims = 0x0d3a // GlSubpixelBits GlSubpixelBits = 0x0d50 // GlRedBits GlRedBits = 0x0d52 // GlGreenBits GlGreenBits = 0x0d53 // GlBlueBits GlBlueBits = 0x0d54 // GlAlphaBits GlAlphaBits = 0x0d55 // GlDepthBits GlDepthBits = 0x0d56 // GlStencilBits GlStencilBits = 0x0d57 // GlPolygonOffsetUnits GlPolygonOffsetUnits = 0x2a00 // GlPolygonOffsetFactor GlPolygonOffsetFactor = 0x8038 // GlTextureBinding2d GlTextureBinding2d = 0x8069 // GlSampleBuffers GlSampleBuffers = 0x80a8 // GlSamples GlSamples = 0x80a9 // GlSampleCoverageValue GlSampleCoverageValue = 0x80aa // GlSampleCoverageInvert GlSampleCoverageInvert = 0x80ab // GlCompressedTextureFormats GlCompressedTextureFormats = 0x86a3 // GlVendor GlVendor = 0x1f00 // GlRenderer GlRenderer = 0x1f01 // GlVersion GlVersion = 0x1f02 // GlImplementationColorReadType GlImplementationColorReadType = 0x8b9a // GlImplementationColorReadFormat GlImplementationColorReadFormat = 0x8b9b // GlBrowserDefaultWebgl GlBrowserDefaultWebgl = 0x9244 // GlStaticDraw passed to <code>bufferdata</code> as a hint about whether the contents of the buffer are likely to be used often and not change often. GlStaticDraw = 0x88e4 // GlStreamDraw passed to <code>bufferdata</code> as a hint about whether the contents of the buffer are likely to not be used often. GlStreamDraw = 0x88e0 // GlDynamicDraw passed to <code>bufferdata</code> as a hint about whether the contents of the buffer are likely to be used often and change often. GlDynamicDraw = 0x88e8 // GlArrayBuffer passed to <code>bindbuffer</code> or <code>bufferdata</code> to specify the type of buffer being used. GlArrayBuffer = 0x8892 // GlElementArrayBuffer passed to <code>bindbuffer</code> or <code>bufferdata</code> to specify the type of buffer being used. GlElementArrayBuffer = 0x8893 // GlBufferSize passed to <code>getbufferparameter</code> to get a buffer's size. GlBufferSize = 0x8764 // GlBufferUsage passed to <code>getbufferparameter</code> to get the hint for the buffer passed in when it was created. GlBufferUsage = 0x8765 // GlCurrentVertexAttrib passed to <code>getvertexattrib</code> to read back the current vertex attribute. GlCurrentVertexAttrib = 0x8626 // GlVertexAttribArrayEnabled GlVertexAttribArrayEnabled = 0x8622 // GlVertexAttribArraySize GlVertexAttribArraySize = 0x8623 // GlVertexAttribArrayStride GlVertexAttribArrayStride = 0x8624 // GlVertexAttribArrayType GlVertexAttribArrayType = 0x8625 // GlVertexAttribArrayNormalized GlVertexAttribArrayNormalized = 0x886a // GlVertexAttribArrayPointer GlVertexAttribArrayPointer = 0x8645 // GlVertexAttribArrayBufferBinding GlVertexAttribArrayBufferBinding = 0x889f // GlCullFace passed to <code>enable</code>/<code>disable</code> to turn on/off culling. can also be used with <code>getparameter</code> to find the current culling method. GlCullFace = 0x0b44 // GlFront passed to <code>cullface</code> to specify that only front faces should be culled. GlFront = 0x0404 // GlBack passed to <code>cullface</code> to specify that only back faces should be culled. GlBack = 0x0405 // GlFrontAndBack passed to <code>cullface</code> to specify that front and back faces should be culled. GlFrontAndBack = 0x0408 // GlBlend passed to <code>enable</code>/<code>disable</code> to turn on/off blending. can also be used with <code>getparameter</code> to find the current blending method. GlBlend = 0x0be2 // GlDepthTest passed to <code>enable</code>/<code>disable</code> to turn on/off the depth test. can also be used with <code>getparameter</code> to query the depth test. GlDepthTest = 0x0b71 // GlDither passed to <code>enable</code>/<code>disable</code> to turn on/off dithering. can also be used with <code>getparameter</code> to find the current dithering method. GlDither = 0x0bd0 // GlPolygonOffsetFill passed to <code>enable</code>/<code>disable</code> to turn on/off the polygon offset. useful for rendering hidden-line images, decals, and or solids with highlighted edges. can also be used with <code>getparameter</code> to query the scissor test. GlPolygonOffsetFill = 0x8037 // GlSampleAlphaToCoverage passed to <code>enable</code>/<code>disable</code> to turn on/off the alpha to coverage. used in multi-sampling alpha channels. GlSampleAlphaToCoverage = 0x809e // GlSampleCoverage passed to <code>enable</code>/<code>disable</code> to turn on/off the sample coverage. used in multi-sampling. GlSampleCoverage = 0x80a0 // GlScissorTest passed to <code>enable</code>/<code>disable</code> to turn on/off the scissor test. can also be used with <code>getparameter</code> to query the scissor test. GlScissorTest = 0x0c11 // GlStencilTest passed to <code>enable</code>/<code>disable</code> to turn on/off the stencil test. can also be used with <code>getparameter</code> to query the stencil test. GlStencilTest = 0x0b90 // GlNoError returned from <code>geterror</code>. GlNoError = 0 // GlInvalidEnum returned from <code>geterror</code>. GlInvalidEnum = 0x0500 // GlInvalidValue returned from <code>geterror</code>. GlInvalidValue = 0x0501 // GlInvalidOperation returned from <code>geterror</code>. GlInvalidOperation = 0x0502 // GlOutOfMemory returned from <code>geterror</code>. GlOutOfMemory = 0x0505 // GlContextLostWebgl returned from <code>geterror</code>. GlContextLostWebgl = 0x9242 // GlCw passed to <code>frontface</code> to specify the front face of a polygon is drawn in the clockwise direction GlCw = 0x0900 // GlCcw passed to <code>frontface</code> to specify the front face of a polygon is drawn in the counter clockwise direction GlCcw = 0x0901 // GlDontCare there is no preference for this behavior. GlDontCare = 0x1100 // GlFastest the most efficient behavior should be used. GlFastest = 0x1101 // GlNicest the most correct or the highest quality option should be used. GlNicest = 0x1102 // GlGenerateMipmapHint hint for the quality of filtering when generating mipmap images with <a href="/en-us/docs/web/api/webglrenderingcontext/generatemipmap" title="the webglrenderingcontext.generatemipmap() method of the webgl api generates a set of mipmaps for a webgltexture object."><code>webglrenderingcontext.generatemipmap()</code></a>. GlGenerateMipmapHint = 0x8192 // GlByte GlByte = 0x1400 // GlShort GlShort = 0x1402 // GlUnsignedShort GlUnsignedShort = 0x1403 // GlInt GlInt = 0x1404 // GlUnsignedInt GlUnsignedInt = 0x1405 // GlFloat GlFloat = 0x1406 // GlDepthComponent GlDepthComponent = 0x1902 // GlAlpha GlAlpha = 0x1906 // GlRGB GlRGB = 0x1907 // GlRGBA GlRGBA = 0x1908 // GlLuminance GlLuminance = 0x1909 // GlLuminanceAlpha GlLuminanceAlpha = 0x190a // GlUnsignedByte GlUnsignedByte = 0x1401 // GlUnsignedShort4444 GlUnsignedShort4444 = 0x8033 // GlUnsignedShort5551 GlUnsignedShort5551 = 0x8034 // GlUnsignedShort565 GlUnsignedShort565 = 0x8363 // GlFragmentShader passed to <code>createshader</code> to define a fragment shader. GlFragmentShader = 0x8b30 // GlVertexShader passed to <code>createshader</code> to define a vertex shader GlVertexShader = 0x8b31 // GlCompileStatus passed to <code>getshaderparamter</code> to get the status of the compilation. returns false if the shader was not compiled. you can then query <code>getshaderinfolog</code> to find the exact error GlCompileStatus = 0x8b81 // GlDeleteStatus passed to <code>getshaderparamter</code> to determine if a shader was deleted via <code>deleteshader</code>. returns true if it was, false otherwise. GlDeleteStatus = 0x8b80 // GlLinkStatus passed to <code>getprogramparameter</code> after calling <code>linkprogram</code> to determine if a program was linked correctly. returns false if there were errors. use <code>getprograminfolog</code> to find the exact error. GlLinkStatus = 0x8b82 // GlValidateStatus passed to <code>getprogramparameter</code> after calling <code>validateprogram</code> to determine if it is valid. returns false if errors were found. GlValidateStatus = 0x8b83 // GlAttachedShaders passed to <code>getprogramparameter</code> after calling <code>attachshader</code> to determine if the shader was attached correctly. returns false if errors occurred. GlAttachedShaders = 0x8b85 // GlActiveAttributes passed to <code>getprogramparameter</code> to get the number of attributes active in a program. GlActiveAttributes = 0x8b89 // GlActiveUniforms passed to <code>getprogramparamter</code> to get the number of uniforms active in a program. GlActiveUniforms = 0x8b86 // GlMaxVertexAttribs the maximum number of entries possible in the vertex attribute list. GlMaxVertexAttribs = 0x8869 // GlMaxVertexUniformVectors GlMaxVertexUniformVectors = 0x8dfb // GlMaxVaryingVectors GlMaxVaryingVectors = 0x8dfc // GlMaxCombinedTextureImageUnits GlMaxCombinedTextureImageUnits = 0x8b4d // GlMaxVertexTextureImageUnits GlMaxVertexTextureImageUnits = 0x8b4c // GlMaxTextureImageUnits implementation dependent number of maximum texture units. at least 8. GlMaxTextureImageUnits = 0x8872 // GlMaxFragmentUniformVectors GlMaxFragmentUniformVectors = 0x8dfd // GlShaderType GlShaderType = 0x8b4f // GlShadingLanguageVersion GlShadingLanguageVersion = 0x8b8c // GlCurrentProgram GlCurrentProgram = 0x8b8d // GlNever passed to <code>depthfunction</code> or <code>stencilfunction</code> to specify depth or stencil tests will never pass. i.e. nothing will be drawn. GlNever = 0x0200 // GlLess passed to <code>depthfunction</code> or <code>stencilfunction</code> to specify depth or stencil tests will pass if the new depth value is less than the stored value. GlLess = 0x0201 // GlEqual passed to <code>depthfunction</code> or <code>stencilfunction</code> to specify depth or stencil tests will pass if the new depth value is equals to the stored value. GlEqual = 0x0202 // GlLEqual passed to <code>depthfunction</code> or <code>stencilfunction</code> to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value. GlLEqual = 0x0203 // GlGreater passed to <code>depthfunction</code> or <code>stencilfunction</code> to specify depth or stencil tests will pass if the new depth value is greater than the stored value. GlGreater = 0x0204 // GlNotEqual passed to <code>depthfunction</code> or <code>stencilfunction</code> to specify depth or stencil tests will pass if the new depth value is not equal to the stored value. GlNotEqual = 0x0205 // GlGEqual passed to <code>depthfunction</code> or <code>stencilfunction</code> to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value. GlGEqual = 0x0206 // GlAlways passed to <code>depthfunction</code> or <code>stencilfunction</code> to specify depth or stencil tests will always pass. i.e. pixels will be drawn in the order they are drawn. GlAlways = 0x0207 // GlKeep GlKeep = 0x1e00 // GlReplace GlReplace = 0x1e01 // GlIncr GlIncr = 0x1e02 // GlDecr GlDecr = 0x1e03 // GlInvert GlInvert = 0x150a // GlIncrWrap GlIncrWrap = 0x8507 // GlDecrWrap GlDecrWrap = 0x8508 // GlNearest GlNearest = 0x2600 // GlLinear GlLinear = 0x2601 // GlNearestMipmapNearest GlNearestMipmapNearest = 0x2700 // GlLinearMipmapNearest GlLinearMipmapNearest = 0x2701 // GlNearestMipmapLinear GlNearestMipmapLinear = 0x2702 // GlLinearMipmapLinear GlLinearMipmapLinear = 0x2703 // GlTextureMagFilter GlTextureMagFilter = 0x2800 // GlTextureMinFilter GlTextureMinFilter = 0x2801 // GlTextureWrapS GlTextureWrapS = 0x2802 // GlTextureWrapT GlTextureWrapT = 0x2803 // GlTexture2D GlTexture2D = 0x0de1 // GlTexture GlTexture = 0x1702 // GlTextureCubeMap GlTextureCubeMap = 0x8513 // GlTextureBindingCubeMap GlTextureBindingCubeMap = 0x8514 // GlTextureCubeMapPositiveX GlTextureCubeMapPositiveX = 0x8515 // GlTextureCubeMapNegativeX GlTextureCubeMapNegativeX = 0x8516 // GlTextureCubeMapPositiveY GlTextureCubeMapPositiveY = 0x8517 // GlTextureCubeMapNegativeY GlTextureCubeMapNegativeY = 0x8518 // GlTextureCubeMapPositiveZ GlTextureCubeMapPositiveZ = 0x8519 // GlTextureCubeMapNegativeZ GlTextureCubeMapNegativeZ = 0x851a // GlMaxCubeMapTextureSize GlMaxCubeMapTextureSize = 0x851c // GlActiveTexture the current active texture unit. GlActiveTexture = 0x84e0 // GlRepeat GlRepeat = 0x2901 // GlClampToEdge GlClampToEdge = 0x812f // GlMirroredRepeat GlMirroredRepeat = 0x8370 // GlFloatVec2 GlFloatVec2 = 0x8b50 // GlFloatVec3 GlFloatVec3 = 0x8b51 // GlFloatVec4 GlFloatVec4 = 0x8b52 // GlIntVec2 GlIntVec2 = 0x8b53 // GlIntVec3 GlIntVec3 = 0x8b54 // GlIntVec4 GlIntVec4 = 0x8b55 // GlBool GlBool = 0x8b56 // GlBoolVec2 GlBoolVec2 = 0x8b57 // GlBoolVec3 GlBoolVec3 = 0x8b58 // GlBoolVec4 GlBoolVec4 = 0x8b59 // GlFloatMat2 GlFloatMat2 = 0x8b5a // GlFloatMat3 GlFloatMat3 = 0x8b5b // GlFloatMat4 GlFloatMat4 = 0x8b5c // GlSampler2d GlSampler2d = 0x8b5e // GlSamplerCube GlSamplerCube = 0x8b60 // GlLowFloat GlLowFloat = 0x8df0 // GlMediumFloat GlMediumFloat = 0x8df1 // GlHighFloat GlHighFloat = 0x8df2 // GlLowInt GlLowInt = 0x8df3 // GlMediumInt GlMediumInt = 0x8df4 // GlHighInt GlHighInt = 0x8df5 // GlFramebuffer GlFramebuffer = 0x8d40 // GlRenderbuffer GlRenderbuffer = 0x8d41 // GlRGBA4 GlRGBA4 = 0x8056 // GlRGB5A1 GlRGB5A1 = 0x8057 // GlRGB565 GlRGB565 = 0x8d62 // GlDepthComponent16 GlDepthComponent16 = 0x81a5 // GlStencilIndex8 GlStencilIndex8 = 0x8d48 // GlDepthStencil GlDepthStencil = 0x84f9 // GlRenderbufferWidth GlRenderbufferWidth = 0x8d42 // GlRenderbufferHeight GlRenderbufferHeight = 0x8d43 // GlRenderbufferInternalFormat GlRenderbufferInternalFormat = 0x8d44 // GlRenderbufferRedSize GlRenderbufferRedSize = 0x8d50 // GlRenderbufferGreenSize GlRenderbufferGreenSize = 0x8d51 // GlRenderbufferBlueSize GlRenderbufferBlueSize = 0x8d52 // GlRenderbufferAlphaSize GlRenderbufferAlphaSize = 0x8d53 // GlRenderbufferDepthSize GlRenderbufferDepthSize = 0x8d54 // GlRenderbufferStencilSize GlRenderbufferStencilSize = 0x8d55 // GlFramebufferAttachmentObjectType GlFramebufferAttachmentObjectType = 0x8cd0 // GlFramebufferAttachmentObjectName GlFramebufferAttachmentObjectName = 0x8cd1 // GlFramebufferAttachmentTextureLevel GlFramebufferAttachmentTextureLevel = 0x8cd2 // GlFramebufferAttachmentTextureCubeMapFace GlFramebufferAttachmentTextureCubeMapFace = 0x8cd3 // GlColorAttachment0 GlColorAttachment0 = 0x8ce0 // GlDepthAttachment GlDepthAttachment = 0x8d00 // GlStencilAttachment GlStencilAttachment = 0x8d20 // GlNone GlNone = 0 // GlFramebufferComplete GlFramebufferComplete = 0x8cd5 // GlFramebufferIncompleteAttachment GlFramebufferIncompleteAttachment = 0x8cd6 // GlFramebufferIncompleteMissingAttachment GlFramebufferIncompleteMissingAttachment = 0x8cd7 // GlFramebufferIncompleteDimensions GlFramebufferIncompleteDimensions = 0x8cd9 // GlFramebufferUnsupported GlFramebufferUnsupported = 0x8cdd // GlFramebufferBinding GlFramebufferBinding = 0x8ca6 // GlRenderbufferBinding GlRenderbufferBinding = 0x8ca7 // GlMaxRenderbufferSize GlMaxRenderbufferSize = 0x84e8 // GlInvalidFramebufferOperation GlInvalidFramebufferOperation = 0x0506 // GlUnpackFlipYWebgl GlUnpackFlipYWebgl = 0x9240 // GlUnpackPremultiplyAlphaWebgl GlUnpackPremultiplyAlphaWebgl = 0x9241 // GlUnpackColorspaceConversionWebgl GlUnpackColorspaceConversionWebgl = 0x9243 // GlReadBuffer GlReadBuffer = 0x0c02 // GlUnpackRowLength GlUnpackRowLength = 0x0cf2 // GlUnpackSkipRows GlUnpackSkipRows = 0x0cf3 // GlUnpackSkipPixels GlUnpackSkipPixels = 0x0cf4 // GlPackRowLength GlPackRowLength = 0x0d02 // GlPackSkipRows GlPackSkipRows = 0x0d03 // GlPackSkipPixels GlPackSkipPixels = 0x0d04 // GlTextureBinding3d GlTextureBinding3d = 0x806a // GlUnpackSkipImages GlUnpackSkipImages = 0x806d // GlUnpackImageHeight GlUnpackImageHeight = 0x806e // GlMax3dTextureSize GlMax3dTextureSize = 0x8073 // GlMaxElementsVertices GlMaxElementsVertices = 0x80e8 // GlMaxElementsIndices GlMaxElementsIndices = 0x80e9 // GlMaxTextureLodBias GlMaxTextureLodBias = 0x84fd // GlMaxFragmentUniformComponents GlMaxFragmentUniformComponents = 0x8b49 // GlMaxVertexUniformComponents GlMaxVertexUniformComponents = 0x8b4a // GlMaxArrayTextureLayers GlMaxArrayTextureLayers = 0x88ff // GlMinProgramTexelOffset GlMinProgramTexelOffset = 0x8904 // GlMaxProgramTexelOffset GlMaxProgramTexelOffset = 0x8905 // GlMaxVaryingComponents GlMaxVaryingComponents = 0x8b4b // GlFragmentShaderDerivativeHint GlFragmentShaderDerivativeHint = 0x8b8b // GlRasterizerDiscard GlRasterizerDiscard = 0x8c89 // GlVertexArrayBinding GlVertexArrayBinding = 0x85b5 // GlMaxVertexOutputComponents GlMaxVertexOutputComponents = 0x9122 // GlMaxFragmentInputComponents GlMaxFragmentInputComponents = 0x9125 // GlMaxServerWaitTimeout GlMaxServerWaitTimeout = 0x9111 // GlMaxElementIndex GlMaxElementIndex = 0x8d6b // GlRed GlRed = 0x1903 // GlRGB8 GlRGB8 = 0x8051 // GlRGBA8 GlRGBA8 = 0x8058 // GlRGB10A2 GlRGB10A2 = 0x8059 // GlTexture3d GlTexture3d = 0x806f // GlTextureWrapR GlTextureWrapR = 0x8072 // GlTextureMinLod GlTextureMinLod = 0x813a // GlTextureMaxLod GlTextureMaxLod = 0x813b // GlTextureBaseLevel GlTextureBaseLevel = 0x813c // GlTextureMaxLevel GlTextureMaxLevel = 0x813d // GlTextureCompareMode GlTextureCompareMode = 0x884c // GlTextureCompareFunc GlTextureCompareFunc = 0x884d // GlSrgb GlSrgb = 0x8c40 // GlSrgb8 GlSrgb8 = 0x8c41 // GlSrgb8Alpha8 GlSrgb8Alpha8 = 0x8c43 // GlCompareRefToTexture GlCompareRefToTexture = 0x884e // GlRGBA32f GlRGBA32f = 0x8814 // GlRGB32f GlRGB32f = 0x8815 // GlRGBA16f GlRGBA16f = 0x881a // GlRGB16f GlRGB16f = 0x881b // GlTexture2DArray GlTexture2DArray = 0x8c1a // GlTextureBinding2dArray GlTextureBinding2dArray = 0x8c1d // GlR11fG11fB10f GlR11fG11fB10f = 0x8c3a // GlRGB9E5 GlRGB9E5 = 0x8c3d // GlRGBA32ui GlRGBA32ui = 0x8d70 // GlRGB32ui GlRGB32ui = 0x8d71 // GlRGBA16ui GlRGBA16ui = 0x8d76 // GlRGB16ui GlRGB16ui = 0x8d77 // GlRGBA8ui GlRGBA8ui = 0x8d7c // GlRGB8ui GlRGB8ui = 0x8d7d // GlRGBA32i GlRGBA32i = 0x8d82 // GlRGB32i GlRGB32i = 0x8d83 // GlRGBA16i GlRGBA16i = 0x8d88 // GlRGB16i GlRGB16i = 0x8d89 // GlRGBA8i GlRGBA8i = 0x8d8e // GlRGB8i GlRGB8i = 0x8d8f // GlRedInteger GlRedInteger = 0x8d94 // GlRGBInteger GlRGBInteger = 0x8d98 // GlRGBAInteger GlRGBAInteger = 0x8d99 // GlR8 GlR8 = 0x8229 // GlRg8 GlRg8 = 0x822b // GlRGB10A2ui GlRGB10A2ui = 0x906f // GlTextureImmutableFormat GlTextureImmutableFormat = 0x912f // GlTextureImmutableLevels GlTextureImmutableLevels = 0x82df // GlUnsignedInt2101010Rev GlUnsignedInt2101010Rev = 0x8368 // GlUnsignedInt10f11f11fRev GlUnsignedInt10f11f11fRev = 0x8c3b // GlUnsignedInt5999Rev GlUnsignedInt5999Rev = 0x8c3e // GlFloat32UnsignedInt248Rev GlFloat32UnsignedInt248Rev = 0x8dad // GlHalfFloat GlHalfFloat = 0x140b // GlRg GlRg = 0x8227 // GlRgInteger GlRgInteger = 0x8228 // GlInt2101010Rev GlInt2101010Rev = 0x8d9f // GlCurrentQuery GlCurrentQuery = 0x8865 // GlQueryResult GlQueryResult = 0x8866 // GlQueryResultAvailable GlQueryResultAvailable = 0x8867 // GlAnySamplesPassed GlAnySamplesPassed = 0x8c2f // GlAnySamplesPassedConservative GlAnySamplesPassedConservative = 0x8d6a // GlMaxDrawBuffers GlMaxDrawBuffers = 0x8824 // GlDrawBuffer0 GlDrawBuffer0 = 0x8825 // GlDrawBuffer1 GlDrawBuffer1 = 0x8826 // GlDrawBuffer2 GlDrawBuffer2 = 0x8827 // GlDrawBuffer3 GlDrawBuffer3 = 0x8828 // GlDrawBuffer4 GlDrawBuffer4 = 0x8829 // GlDrawBuffer5 GlDrawBuffer5 = 0x882a // GlDrawBuffer6 GlDrawBuffer6 = 0x882b // GlDrawBuffer7 GlDrawBuffer7 = 0x882c // GlDrawBuffer8 GlDrawBuffer8 = 0x882d // GlDrawBuffer9 GlDrawBuffer9 = 0x882e // GlDrawBuffer10 GlDrawBuffer10 = 0x882f // GlDrawBuffer11 GlDrawBuffer11 = 0x8830 // GlDrawBuffer12 GlDrawBuffer12 = 0x8831 // GlDrawBuffer13 GlDrawBuffer13 = 0x8832 // GlDrawBuffer14 GlDrawBuffer14 = 0x8833 // GlDrawBuffer15 GlDrawBuffer15 = 0x8834 // GlMaxColorAttachments GlMaxColorAttachments = 0x8cdf // GlColorAttachment1 GlColorAttachment1 = 0x8ce1 // GlColorAttachment2 GlColorAttachment2 = 0x8ce2 // GlColorAttachment3 GlColorAttachment3 = 0x8ce3 // GlColorAttachment4 GlColorAttachment4 = 0x8ce4 // GlColorAttachment5 GlColorAttachment5 = 0x8ce5 // GlColorAttachment6 GlColorAttachment6 = 0x8ce6 // GlColorAttachment7 GlColorAttachment7 = 0x8ce7 // GlColorAttachment8 GlColorAttachment8 = 0x8ce8 // GlColorAttachment9 GlColorAttachment9 = 0x8ce9 // GlColorAttachment10 GlColorAttachment10 = 0x8cea // GlColorAttachment11 GlColorAttachment11 = 0x8ceb // GlColorAttachment12 GlColorAttachment12 = 0x8cec // GlColorAttachment13 GlColorAttachment13 = 0x8ced // GlColorAttachment14 GlColorAttachment14 = 0x8cee // GlColorAttachment15 GlColorAttachment15 = 0x8cef // GlSampler3d GlSampler3d = 0x8b5f // GlSampler2dShadow GlSampler2dShadow = 0x8b62 // GlSampler2dArray GlSampler2dArray = 0x8dc1 // GlSampler2dArrayShadow GlSampler2dArrayShadow = 0x8dc4 // GlSamplerCubeShadow GlSamplerCubeShadow = 0x8dc5 // GlIntSampler2d GlIntSampler2d = 0x8dca // GlIntSampler3d GlIntSampler3d = 0x8dcb // GlIntSamplerCube GlIntSamplerCube = 0x8dcc // GlIntSampler2dArray GlIntSampler2dArray = 0x8dcf // GlUnsignedIntSampler2d GlUnsignedIntSampler2d = 0x8dd2 // GlUnsignedIntSampler3d GlUnsignedIntSampler3d = 0x8dd3 // GlUnsignedIntSamplerCube GlUnsignedIntSamplerCube = 0x8dd4 // GlUnsignedIntSampler2dArray GlUnsignedIntSampler2dArray = 0x8dd7 // GlMaxSamples GlMaxSamples = 0x8d57 // GlSamplerBinding GlSamplerBinding = 0x8919 // GlPixelPackBuffer GlPixelPackBuffer = 0x88eb // GlPixelUnpackBuffer GlPixelUnpackBuffer = 0x88ec // GlPixelPackBufferBinding GlPixelPackBufferBinding = 0x88ed // GlPixelUnpackBufferBinding GlPixelUnpackBufferBinding = 0x88ef // GlCopyReadBuffer GlCopyReadBuffer = 0x8f36 // GlCopyWriteBuffer GlCopyWriteBuffer = 0x8f37 // GlCopyReadBufferBinding GlCopyReadBufferBinding = 0x8f36 // GlCopyWriteBufferBinding GlCopyWriteBufferBinding = 0x8f37 // GlFloatMat2x3 GlFloatMat2x3 = 0x8b65 // GlFloatMat2x4 GlFloatMat2x4 = 0x8b66 // GlFloatMat3x2 GlFloatMat3x2 = 0x8b67 // GlFloatMat3x4 GlFloatMat3x4 = 0x8b68 // GlFloatMat4x2 GlFloatMat4x2 = 0x8b69 // GlFloatMat4x3 GlFloatMat4x3 = 0x8b6a // GlUnsignedIntVec2 GlUnsignedIntVec2 = 0x8dc6 // GlUnsignedIntVec3 GlUnsignedIntVec3 = 0x8dc7 // GlUnsignedIntVec4 GlUnsignedIntVec4 = 0x8dc8 // GlUnsignedNormalized GlUnsignedNormalized = 0x8c17 // GlSignedNormalized GlSignedNormalized = 0x8f9c // GlVertexAttribArrayInteger GlVertexAttribArrayInteger = 0x88fd // GlVertexAttribArrayDivisor GlVertexAttribArrayDivisor = 0x88fe // GlTransformFeedbackBufferMode GlTransformFeedbackBufferMode = 0x8c7f // GlMaxTransformFeedbackSeparateComponents GlMaxTransformFeedbackSeparateComponents = 0x8c80 // GlTransformFeedbackVaryings GlTransformFeedbackVaryings = 0x8c83 // GlTransformFeedbackBufferStart GlTransformFeedbackBufferStart = 0x8c84 // GlTransformFeedbackBufferSize GlTransformFeedbackBufferSize = 0x8c85 // GlTransformFeedbackPrimitivesWritten GlTransformFeedbackPrimitivesWritten = 0x8c88 // GlMaxTransformFeedbackInterleavedComponents GlMaxTransformFeedbackInterleavedComponents = 0x8c8a // GlMaxTransformFeedbackSeparateAttribs GlMaxTransformFeedbackSeparateAttribs = 0x8c8b // GlInterleavedAttribs GlInterleavedAttribs = 0x8c8c // GlSeparateAttribs GlSeparateAttribs = 0x8c8d // GlTransformFeedbackBuffer GlTransformFeedbackBuffer = 0x8c8e // GlTransformFeedbackBufferBinding GlTransformFeedbackBufferBinding = 0x8c8f // GlTransformFeedback GlTransformFeedback = 0x8e22 // GlTransformFeedbackPaused GlTransformFeedbackPaused = 0x8e23 // GlTransformFeedbackActive GlTransformFeedbackActive = 0x8e24 // GlTransformFeedbackBinding GlTransformFeedbackBinding = 0x8e25 // GlFramebufferAttachmentColorEncoding GlFramebufferAttachmentColorEncoding = 0x8210 // GlFramebufferAttachmentComponentType GlFramebufferAttachmentComponentType = 0x8211 // GlFramebufferAttachmentRedSize GlFramebufferAttachmentRedSize = 0x8212 // GlFramebufferAttachmentGreenSize GlFramebufferAttachmentGreenSize = 0x8213 // GlFramebufferAttachmentBlueSize GlFramebufferAttachmentBlueSize = 0x8214 // GlFramebufferAttachmentAlphaSize GlFramebufferAttachmentAlphaSize = 0x8215 // GlFramebufferAttachmentDepthSize GlFramebufferAttachmentDepthSize = 0x8216 // GlFramebufferAttachmentStencilSize GlFramebufferAttachmentStencilSize = 0x8217 // GlFramebufferDefault GlFramebufferDefault = 0x8218 // GlDepthStencilAttachment GlDepthStencilAttachment = 0x821a // GlDepth24Stencil8 GlDepth24Stencil8 = 0x88f0 // GlDrawFramebufferBinding GlDrawFramebufferBinding = 0x8ca6 // GlReadFramebuffer GlReadFramebuffer = 0x8ca8 // GlDrawFramebuffer GlDrawFramebuffer = 0x8ca9 // GlReadFramebufferBinding GlReadFramebufferBinding = 0x8caa // GlRenderbufferSamples GlRenderbufferSamples = 0x8cab // GlFramebufferAttachmentTextureLayer GlFramebufferAttachmentTextureLayer = 0x8cd4 // GlFramebufferIncompleteMultisample GlFramebufferIncompleteMultisample = 0x8d56 // GlUniformBuffer GlUniformBuffer = 0x8a11 // GlUniformBufferBinding GlUniformBufferBinding = 0x8a28 // GlUniformBufferStart GlUniformBufferStart = 0x8a29 // GlUniformBufferSize GlUniformBufferSize = 0x8a2a // GlMaxVertexUniformBlocks GlMaxVertexUniformBlocks = 0x8a2b // GlMaxFragmentUniformBlocks GlMaxFragmentUniformBlocks = 0x8a2d // GlMaxCombinedUniformBlocks GlMaxCombinedUniformBlocks = 0x8a2e // GlMaxUniformBufferBindings GlMaxUniformBufferBindings = 0x8a2f // GlMaxUniformBlockSize GlMaxUniformBlockSize = 0x8a30 // GlMaxCombinedVertexUniformComponents GlMaxCombinedVertexUniformComponents = 0x8a31 // GlMaxCombinedFragmentUniformComponents GlMaxCombinedFragmentUniformComponents = 0x8a33 // GlUniformBufferOffsetAlignment GlUniformBufferOffsetAlignment = 0x8a34 // GlActiveUniformBlocks GlActiveUniformBlocks = 0x8a36 // GlUniformType GlUniformType = 0x8a37 // GlUniformSize GlUniformSize = 0x8a38 // GlUniformBlockIndex GlUniformBlockIndex = 0x8a3a // GlUniformOffset GlUniformOffset = 0x8a3b // GlUniformArrayStride GlUniformArrayStride = 0x8a3c // GlUniformMatrixStride GlUniformMatrixStride = 0x8a3d // GlUniformIsRowMajor GlUniformIsRowMajor = 0x8a3e // GlUniformBlockBinding GlUniformBlockBinding = 0x8a3f // GlUniformBlockDataSize GlUniformBlockDataSize = 0x8a40 // GlUniformBlockActiveUniforms GlUniformBlockActiveUniforms = 0x8a42 // GlUniformBlockActiveUniformIndices GlUniformBlockActiveUniformIndices = 0x8a43 // GlUniformBlockReferencedByVertexShader GlUniformBlockReferencedByVertexShader = 0x8a44 // GlUniformBlockReferencedByFragmentShader GlUniformBlockReferencedByFragmentShader = 0x8a46 // GlObjectType GlObjectType = 0x9112 // GlSyncCondition GlSyncCondition = 0x9113 // GlSyncStatus GlSyncStatus = 0x9114 // GlSyncFlags GlSyncFlags = 0x9115 // GlSyncFence GlSyncFence = 0x9116 // GlSyncGpuCommandsComplete GlSyncGpuCommandsComplete = 0x9117 // GlUnsignaled GlUnsignaled = 0x9118 // GlSignaled GlSignaled = 0x9119 // GlAlreadySignaled GlAlreadySignaled = 0x911a // GlTimeoutExpired GlTimeoutExpired = 0x911b // GlConditionSatisfied GlConditionSatisfied = 0x911c // GlWaitFailed GlWaitFailed = 0x911d // GlSyncFlushCommandsBit GlSyncFlushCommandsBit = 0x00000001 // GlColor GlColor = 0x1800 // GlStencil GlStencil = 0x1802 // GlMin GlMin = 0x8007 // GlDepthComponent24 GlDepthComponent24 = 0x81a6 // GlStreamRead GlStreamRead = 0x88e1 // GlStreamCopy GlStreamCopy = 0x88e2 // GlStaticRead GlStaticRead = 0x88e5 // GlStaticCopy GlStaticCopy = 0x88e6 // GlDynamicRead GlDynamicRead = 0x88e9 // GlDynamicCopy GlDynamicCopy = 0x88ea // GlDepthComponent32f GlDepthComponent32f = 0x8cac // GlDepth32fStencil8 GlDepth32fStencil8 = 0x8cad // GlInvalidIndex GlInvalidIndex = 0xffffffff // GlTimeoutIgnored GlTimeoutIgnored = -1 // GlMaxClientWaitTimeoutWebgl GlMaxClientWaitTimeoutWebgl = 0x9247 // GlVertexAttribArrayDivisorAngle describes the frequency divisor used for instanced rendering. GlVertexAttribArrayDivisorAngle = 0x88fe // GlUnmaskedVendorWebgl passed to <code>getparameter</code> to get the vendor string of the graphics driver. GlUnmaskedVendorWebgl = 0x9245 // GlUnmaskedRendererWebgl passed to <code>getparameter</code> to get the renderer string of the graphics driver. GlUnmaskedRendererWebgl = 0x9246 // GlMaxTextureMaxAnisotropyExt returns the maximum available anisotropy. GlMaxTextureMaxAnisotropyExt = 0x84ff // GlTextureMaxAnisotropyExt passed to <code>texparameter</code> to set the desired maximum anisotropy for a texture. GlTextureMaxAnisotropyExt = 0x84fe // GlCompressedRgbS3tcDxt1Ext a dxt1-compressed image in an rgb image format. GlCompressedRgbS3tcDxt1Ext = 0x83f0 // GlCompressedRgbaS3tcDxt1Ext a dxt1-compressed image in an rgb image format with a simple on/off alpha value. GlCompressedRgbaS3tcDxt1Ext = 0x83f1 // GlCompressedRgbaS3tcDxt3Ext a dxt3-compressed image in an rgba image format. compared to a 32-bit rgba texture, it offers 4:1 compression. GlCompressedRgbaS3tcDxt3Ext = 0x83f2 // GlCompressedRgbaS3tcDxt5Ext a dxt5-compressed image in an rgba image format. it also provides a 4:1 compression, but differs to the dxt3 compression in how the alpha compression is done. GlCompressedRgbaS3tcDxt5Ext = 0x83f3 // GlCompressedR11Eac one-channel (red) unsigned format compression. GlCompressedR11Eac = 0x9270 // GlCompressedSignedR11Eac one-channel (red) signed format compression. GlCompressedSignedR11Eac = 0x9271 // GlCompressedRg11Eac two-channel (red and green) unsigned format compression. GlCompressedRg11Eac = 0x9272 // GlCompressedSignedRg11Eac two-channel (red and green) signed format compression. GlCompressedSignedRg11Eac = 0x9273 // GlCompressedRgb8Etc2 compresses rbg8 data with no alpha channel. GlCompressedRgb8Etc2 = 0x9274 // GlCompressedRgba8Etc2Eac compresses rgba8 data. the rgb part is encoded the same as <code>rgbEtc2</code>, but the alpha part is encoded separately. GlCompressedRgba8Etc2Eac = 0x9275 // GlCompressedSrgb8Etc2 compresses srbg8 data with no alpha channel. GlCompressedSrgb8Etc2 = 0x9276 // GlCompressedSrgb8Alpha8Etc2Eac compresses srgba8 data. the srgb part is encoded the same as <code>srgbEtc2</code>, but the alpha part is encoded separately. GlCompressedSrgb8Alpha8Etc2Eac = 0x9277 // GlCompressedRgb8PunchthroughAlpha1Etc2 similar to <code>rgb8Etc</code>, but with ability to punch through the alpha channel, which means to make it completely opaque or transparent. GlCompressedRgb8PunchthroughAlpha1Etc2 = 0x9278 // GlCompressedSrgb8PunchthroughAlpha1Etc2 similar to <code>srgb8Etc</code>, but with ability to punch through the alpha channel, which means to make it completely opaque or transparent. GlCompressedSrgb8PunchthroughAlpha1Etc2 = 0x9279 // GlCompressedRgbPvrtc4bppv1Img rgb compression in 4-bit mode. one block for each 4×4 pixels. GlCompressedRgbPvrtc4bppv1Img = 0x8c00 // GlCompressedRgbaPvrtc4bppv1Img rgba compression in 4-bit mode. one block for each 4×4 pixels. GlCompressedRgbaPvrtc4bppv1Img = 0x8c02 // GlCompressedRgbPvrtc2bppv1Img rgb compression in 2-bit mode. one block for each 8×4 pixels. GlCompressedRgbPvrtc2bppv1Img = 0x8c01 // GlCompressedRgbaPvrtc2bppv1Img rgba compression in 2-bit mode. one block for each 8×4 pixe GlCompressedRgbaPvrtc2bppv1Img = 0x8c03 // GlCompressedRgbEtc1Webgl compresses 24-bit rgb data with no alpha channel. GlCompressedRgbEtc1Webgl = 0x8d64 // GlCompressedRgbAtcWebgl compresses rgb textures with no alpha channel. GlCompressedRgbAtcWebgl = 0x8c92 // GlCompressedRgbaAtcExplicitAlphaWebgl compresses rgba textures using explicit alpha encoding (useful when alpha transitions are sharp). GlCompressedRgbaAtcExplicitAlphaWebgl = 0x8c92 // GlCompressedRgbaAtcInterpolatedAlphaWebgl compresses rgba textures using interpolated alpha encoding (useful when alpha transitions are gradient). GlCompressedRgbaAtcInterpolatedAlphaWebgl = 0x87ee // GlUnsignedInt248Webgl unsigned integer type for 24-bit depth texture data. GlUnsignedInt248Webgl = 0x84fa // GlHalfFloatOes half floating-point type (16-bit). GlHalfFloatOes = 0x8d61 // GlRGBA32fExt rgba 32-bit floating-point color-renderable format. GlRGBA32fExt = 0x8814 // GlRGB32fExt rgb 32-bit floating-point color-renderable format. GlRGB32fExt = 0x8815 // GlFramebufferAttachmentComponentTypeExt GlFramebufferAttachmentComponentTypeExt = 0x8211 // GlUnsignedNormalizedExt GlUnsignedNormalizedExt = 0x8c17 // GlMinExt produces the minimum color components of the source and destination colors. GlMinExt = 0x8007 // GlMaxExt produces the maximum color components of the source and destination colors. GlMaxExt = 0x8008 // GlSrgbExt unsized srgb format that leaves the precision up to the driver. GlSrgbExt = 0x8c40 // GlSrgbAlphaExt unsized srgb format with unsized alpha component. GlSrgbAlphaExt = 0x8c42 // GlSrgb8Alpha8Ext sized (8-bit) srgb and alpha formats. GlSrgb8Alpha8Ext = 0x8c43 // GlFramebufferAttachmentColorEncodingExt returns the framebuffer color encoding. GlFramebufferAttachmentColorEncodingExt = 0x8210 // GlFragmentShaderDerivativeHintOes indicates the accuracy of the derivative calculation for the glsl built-in functions: <code>dfdx</code>, <code>dfdy</code>, and <code>fwidth</code>. GlFragmentShaderDerivativeHintOes = 0x8b8b // GlColorAttachment0Webgl framebuffer color attachment point GlColorAttachment0Webgl = 0x8ce0 // GlColorAttachment1Webgl framebuffer color attachment point GlColorAttachment1Webgl = 0x8ce1 // GlColorAttachment2Webgl framebuffer color attachment point GlColorAttachment2Webgl = 0x8ce2 // GlColorAttachment3Webgl framebuffer color attachment point GlColorAttachment3Webgl = 0x8ce3 // GlColorAttachment4Webgl framebuffer color attachment point GlColorAttachment4Webgl = 0x8ce4 // GlColorAttachment5Webgl framebuffer color attachment point GlColorAttachment5Webgl = 0x8ce5 // GlColorAttachment6Webgl framebuffer color attachment point GlColorAttachment6Webgl = 0x8ce6 // GlColorAttachment7Webgl framebuffer color attachment point GlColorAttachment7Webgl = 0x8ce7 // GlColorAttachment8Webgl framebuffer color attachment point GlColorAttachment8Webgl = 0x8ce8 // GlColorAttachment9Webgl framebuffer color attachment point GlColorAttachment9Webgl = 0x8ce9 // GlColorAttachment10Webgl framebuffer color attachment point GlColorAttachment10Webgl = 0x8cea // GlColorAttachment11Webgl framebuffer color attachment point GlColorAttachment11Webgl = 0x8ceb // GlColorAttachment12Webgl framebuffer color attachment point GlColorAttachment12Webgl = 0x8cec // GlColorAttachment13Webgl framebuffer color attachment point GlColorAttachment13Webgl = 0x8ced // GlColorAttachment14Webgl framebuffer color attachment point GlColorAttachment14Webgl = 0x8cee // GlColorAttachment15Webgl framebuffer color attachment point GlColorAttachment15Webgl = 0x8cef // GlDrawBuffer0Webgl draw buffer GlDrawBuffer0Webgl = 0x8825 // GlDrawBuffer1Webgl draw buffer GlDrawBuffer1Webgl = 0x8826 // GlDrawBuffer2Webgl draw buffer GlDrawBuffer2Webgl = 0x8827 // GlDrawBuffer3Webgl draw buffer GlDrawBuffer3Webgl = 0x8828 // GlDrawBuffer4Webgl draw buffer GlDrawBuffer4Webgl = 0x8829 // GlDrawBuffer5Webgl draw buffer GlDrawBuffer5Webgl = 0x882a // GlDrawBuffer6Webgl draw buffer GlDrawBuffer6Webgl = 0x882b // GlDrawBuffer7Webgl draw buffer GlDrawBuffer7Webgl = 0x882c // GlDrawBuffer8Webgl draw buffer GlDrawBuffer8Webgl = 0x882d // GlDrawBuffer9Webgl draw buffer GlDrawBuffer9Webgl = 0x882e // GlDrawBuffer10Webgl draw buffer GlDrawBuffer10Webgl = 0x882f // GlDrawBuffer11Webgl draw buffer GlDrawBuffer11Webgl = 0x8830 // GlDrawBuffer12Webgl draw buffer GlDrawBuffer12Webgl = 0x8831 // GlDrawBuffer13Webgl draw buffer GlDrawBuffer13Webgl = 0x8832 // GlDrawBuffer14Webgl draw buffer GlDrawBuffer14Webgl = 0x8833 // GlDrawBuffer15Webgl draw buffer GlDrawBuffer15Webgl = 0x8834 // GlMaxColorAttachmentsWebgl maximum number of framebuffer color attachment points GlMaxColorAttachmentsWebgl = 0x8cdf // GlMaxDrawBuffersWebgl maximum number of draw buffers GlMaxDrawBuffersWebgl = 0x8824 // GlVertexArrayBindingOes the bound vertex array object (vao). GlVertexArrayBindingOes = 0x85b5 // GlQueryCounterBitsExt the number of bits used to hold the query result for the given target. GlQueryCounterBitsExt = 0x8864 // GlCurrentQueryExt the currently active query. GlCurrentQueryExt = 0x8865 // GlQueryResultExt the query result. GlQueryResultExt = 0x8866 // GlQueryResultAvailableExt a boolean indicating whether or not a query result is available. GlQueryResultAvailableExt = 0x8867 // GlTimeElapsedExt elapsed time (in nanoseconds). GlTimeElapsedExt = 0x88bf // GlTimestampExt the current time. GlTimestampExt = 0x8e28 // GlGpuDisjointExt a boolean indicating whether or not the gpu performed any disjoint operation. GlGpuDisjointExt = 0x8fbb )
const ( //GlTexture0 A texture unit. The first texture unit GlTexture0 = iota + 0x84c0 //GlTexture1 A texture unit GlTexture1 //GlTexture2 A texture unit GlTexture2 //GlTexture3 A texture unit GlTexture3 //GlTexture4 A texture unit GlTexture4 //GlTexture5 A texture unit GlTexture5 //GlTexture6 A texture unit GlTexture6 //GlTexture7 A texture unit GlTexture7 //GlTexture8 A texture unit GlTexture8 //GlTexture9 A texture unit GlTexture9 //GlTexture10 A texture unit GlTexture10 //GlTexture11 A texture unit GlTexture11 //GlTexture12 A texture unit GlTexture12 //GlTexture13 A texture unit GlTexture13 //GlTexture14 A texture unit GlTexture14 //GlTexture15 A texture unit GlTexture15 //GlTexture16 A texture unit GlTexture16 //GlTexture17 A texture unit GlTexture17 //GlTexture18 A texture unit GlTexture18 //GlTexture19 A texture unit GlTexture19 //GlTexture20 A texture unit GlTexture20 //GlTexture21 A texture unit GlTexture21 //GlTexture22 A texture unit GlTexture22 //GlTexture23 A texture unit GlTexture23 //GlTexture24 A texture unit GlTexture24 //GlTexture25 A texture unit GlTexture25 //GlTexture26 A texture unit GlTexture26 //GlTexture27 A texture unit GlTexture27 //GlTexture28 A texture unit GlTexture28 //GlTexture29 A texture unit GlTexture29 //GlTexture30 A texture unit GlTexture30 //GlTexture31 A texture unit. The last texture unit. GlTexture31 = 0x84df )
const ( //TextureFilterLinear linear filtering TextureFilterLinear TextureFilter = GlLinear //TextureFilterNearest nearest neighbour filtering TextureFilterNearest = GlNearest //TextureFilterNearestMipmapNearest nearest neighbour filtering TextureFilterNearestMipmapNearest = GlNearestMipmapNearest //TextureFilterLinearMipmapNearest linear filtering TextureFilterLinearMipmapNearest = GlLinearMipmapNearest //TextureFilterNearestMipmapLinear nearest neighbour filtering TextureFilterNearestMipmapLinear = GlNearestMipmapLinear //TextureFilterLinearMipmapLinear linear filtering TextureFilterLinearMipmapLinear = GlLinearMipmapLinear )
const ( //TextureWrapRepeat repeats the texture TextureWrapRepeat TextureWrap = GlRepeat //TextureWrapClampToEdge clamps the texture TextureWrapClampToEdge = GlClampToEdge //TextureWrapMirroredRepeat mirrors the texture TextureWrapMirroredRepeat = GlMirroredRepeat )
const ( //Dash - KeyDash = Key(189) KeyApostrophe = Key(222) KeySemicolon = Key(186) KeyEquals = Key(187) KeyComma = Key(188) KeyPeriod = Key(190) KeySlash = Key(191) KeyBackslash = Key(220) KeyBackspace = Key(8) KeyTab = Key(9) KeyCapsLock = Key(20) KeySpace = Key(32) KeyEnter = Key(13) KeyEscape = Key(27) KeyInsert = Key(45) KeyPrintScreen = Key(42) KeyDelete = Key(46) KeyPageUp = Key(33) KeyPageDown = Key(34) KeyHome = Key(36) KeyEnd = Key(35) KeyPause = Key(19) KeyScrollLock = Key(145) KeyArrowLeft = Key(37) KeyArrowRight = Key(39) KeyArrowDown = Key(40) KeyArrowUp = Key(38) KeyLeftBracket = Key(219) KeyLeftShift = Key(16) KeyLeftControl = Key(17) KeyLeftSuper = Key(73) KeyLeftAlt = Key(18) KeyRightBracket = Key(221) KeyRightShift = Key(16) KeyRightControl = Key(17) KeyRightSuper = Key(73) KeyRightAlt = Key(18) KeyZero = Key(48) KeyOne = Key(49) KeyTwo = Key(50) KeyThree = Key(51) KeyFour = Key(52) KeyFive = Key(53) KeySix = Key(54) KeySeven = Key(55) KeyEight = Key(56) KeyNine = Key(57) KeyF1 = Key(112) KeyF2 = Key(113) KeyF3 = Key(114) KeyF4 = Key(115) KeyF5 = Key(116) KeyF6 = Key(117) KeyF7 = Key(118) KeyF8 = Key(119) KeyF9 = Key(120) KeyF10 = Key(121) KeyF11 = Key(122) KeyF12 = Key(123) KeyA = Key(65) KeyB = Key(66) KeyC = Key(67) KeyD = Key(68) KeyE = Key(69) KeyF = Key(70) KeyG = Key(71) KeyH = Key(72) KeyI = Key(73) KeyJ = Key(74) KeyK = Key(75) KeyL = Key(76) KeyM = Key(77) KeyN = Key(78) KeyO = Key(79) KeyP = Key(80) KeyQ = Key(81) KeyR = Key(82) KeyS = Key(83) KeyT = Key(84) KeyU = Key(85) KeyV = Key(86) KeyW = Key(87) KeyX = Key(88) KeyY = Key(89) KeyZ = Key(90) KeyNumLock = Key(144) KeyNumMultiply = Key(106) KeyNumDivide = Key(111) KeyNumAdd = Key(107) KeyNumSubtract = Key(109) KeyNumZero = Key(96) KeyNumOne = Key(97) KeyNumTwo = Key(98) KeyNumThree = Key(99) KeyNumFour = Key(100) KeyNumFive = Key(101) KeyNumSix = Key(102) KeyNumSeven = Key(103) KeyNumEight = Key(104) KeyNumNine = Key(105) KeyNumDecimal = Key(110) KeyNumEnter = Key(13) )
Variables ¶
var ( // LightGray ... LightGray = NewColor(200, 200, 200, 255) //Gray ... Gray = NewColor(130, 130, 130, 255) //DarkGray ... DarkGray = NewColor(80, 80, 80, 255) //Yellow ... Yellow = NewColor(253, 249, 0, 255) // Yellow //Gold ... Gold = NewColor(255, 203, 0, 255) // Gold //Orange ... Orange = NewColor(255, 161, 0, 255) // Orange //Pink ... Pink = NewColor(255, 109, 194, 255) // Pink //Red ... Red = NewColor(230, 41, 55, 255) // Red //Maroon ... Maroon = NewColor(190, 33, 55, 255) // Maroon //Green ... Green = NewColor(0, 228, 48, 255) // Green //Lime ... Lime = NewColor(0, 158, 47, 255) // Lime //DarkGreen ... DarkGreen = NewColor(0, 117, 44, 255) // Dark Green //SkyBlue ... SkyBlue = NewColor(102, 191, 255, 255) // Sky Blue //Blue ... Blue = NewColor(0, 121, 241, 255) // Blue //DarkBlue ... DarkBlue = NewColor(0, 82, 172, 255) // Dark Blue //Purple ... Purple = NewColor(200, 122, 255, 255) // Purple //Violet ... Violet = NewColor(135, 60, 190, 255) // Violet //DarkPurple ... DarkPurple = NewColor(112, 31, 126, 255) // Dark Purple //Beige ... Beige = NewColor(211, 176, 131, 255) // Beige //Brown ... Brown = NewColor(127, 106, 79, 255) // Brown //DarkBrown ... DarkBrown = NewColor(76, 63, 47, 255) // Dark Brown //White ... White = NewColor(255, 255, 255, 255) // White //Black ... Black = NewColor(0, 0, 0, 255) // Black //Blank (Transparent) Blank = NewColor(0, 0, 0, 0) // Blank (Transparent) //Magenta ... Magenta = NewColor(255, 0, 255, 255) // Magenta //RayWhite - Off White RayWhite = NewColor(245, 245, 245, 255) // My own White (raylib logo) //Aqua ... Aqua = NewColor(0, 162, 156, 255) //GopherBlue is the Go Blue GopherBlue = NewColor(1, 173, 216, 255) //Transparent is completely black with no alpha Transparent = NewColor(0, 0, 0, 0) )
var ( //GL gives direct access to the WebGL component of the canvas. GL *WebGL //DebugDraw causes renderers to display debug information DebugDraw = false //DebugDrawLoops is a less efficent way of drawing, but preserves the box representation when drawing DebugDrawLoops = true //AlwaysDraw continously draws AlwaysDraw = true )
Functions ¶
func AddEventListener ¶
AddEventListener adds a new event listener to the canvas. It will return a JS function that needs to be Released() when its no longer required.
func DT ¶
func DT() float32
DT returns a less accurate version of GetDeltaTime, for all your 32bit mathmatic needs.
func DownloadFile ¶
DownloadFile fetches a URL and return the bytes
func DownloadString ¶
DownloadString fetches a string from the URL
func Float32frombits ¶
Float32frombits returns the floating point number corresponding to the IEEE 754 binary representation b.
func GetDeltaTime ¶
func GetDeltaTime() float64
GetDeltaTime returns a high accuracy difference in time between the last frame and the current one.
func GetFrameTime ¶
func GetFrameTime() float64
GetFrameTime returns the time the last frame was rendered
func NaN32 ¶
func NaN32() float32
NaN32 returns an IEEE 754 “not-a-number” value. Source: https://github.com/chewxy/math32/blob/9a000fcb79dff2019bd78fc28bd676198ff3a616/bits.go
func Run ¶
func Run(application Application) int
Run setups the WebGL context and runs the application. It is blocking and returns an exit code if Exit() is ever called.
Types ¶
type Application ¶
Application handles the base framework
type Color ¶
Color type, RGBA (32bit)
func NewColorFromHSV ¶
NewColorFromHSV turns a HSV to a colour
func NewColorFromNormalized ¶
NewColorFromNormalized creates a colour from the normalized value [0..1]
func NewColorInt ¶
NewColorInt creates a colour from a hexadecimal int
func (Color) LerpHSV ¶
LerpHSV will lerp the color towards another, using their calculated HSV to do so. Note it is more efficient to store the calculated HSV of each and lerp between them
type Font ¶
type Font struct { Spacing float32 //Spacing is the offset between characters // contains filtered or unexported fields }
Font contains meta information about an available font atlas
func LoadFontBitmap ¶
LoadFontBitmap loads a bitmap font, with the given charset map and given characters per line. The image will be directly used as the font. NOTE: Due to Go's inconsistencies and frankly absurb design choice in how it represent strings, this needs to be ASCII Extended only charset. You can map different icons, but this needs to be a []byte basically, because Go is dumb.
Serious, it has some really shit font implementation, and to top it off, it gives me shit like "iterating gives different results than indexing". Its beyond reason
func (*Font) GetCharset ¶
GetCharset gets the current character set
func (*Font) GetTexture ¶
GetTexture gets the current atlas texture
func (*Font) GlyphString ¶
func (f *Font) GlyphString(str string) *GlyphString
GlyphString turns the string into a series of Glyphs. This is used in rendering for drawing each character. A quad can be made at each position, with the UV supplied. All the origins of the sprites are assumed to be at 0,1 (bottom left). When drawing, draw from the bottom left corner. This will ensure the scaling is applied correctly. This function takes into account for their Kerning, but some TTF fonts may not support Kerning (Go Bug)
type FontKerner ¶
FontKerner handles kerning
type GLEnum ¶
type GLEnum = int
GLEnum represents all available WebGL constants, prefixed with Gl and turned into UpperCamelCase. For example, DEPTH_BUFFER_BIT is now GlDepthBufferBit
type Glyph ¶
type Glyph struct { Atlas Rectangle //Atlas defines the UV of the glyph Ascent float32 //Ascent is how far up it should be shifted Descent float32 //Descent is how far down it should be shifted Advance float32 //Advance is how far the next character should start }
Glyph is a particular rune graphic in the atlas
type GlyphString ¶
type GlyphString struct { Positions []Vector2 //Positions is the relative position of each glyph UV []Rectangle //UV is the UV of each glyph LineHeight float32 //LineHeight is the maximium height of each line // contains filtered or unexported fields }
GlyphString is a string made up out of glyphs.
func (*GlyphString) GetFont ¶
func (gstr *GlyphString) GetFont() *Font
GetFont gets the current font in the glyph stirng
func (*GlyphString) GetTexture ¶
func (gstr *GlyphString) GetTexture() *Texture
GetTexture gets the current atlas texture
func (*GlyphString) RenderSprites ¶
func (gstr *GlyphString) RenderSprites(renderer *SpriteRenderer, position Vector2, scale float32, color Color)
RenderSprites uses the SpriteRenderer to draw the glyphs. Its main purpose is to serve as an example on how a renderer could be writen for the fonts. see noodle/font.go for this function.
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
Image is a CPU image
func LoadImageRGBA ¶
LoadImageRGBA loads a go RGBA image
func (*Image) CreateTexture ¶
CreateTexture creates a new texture
func (*Image) IsPowerOf2 ¶
IsPowerOf2 checks if the image is a square power
type InputHandler ¶
type InputHandler struct {
// contains filtered or unexported fields
}
InputHandler handles the different states of the input
func (*InputHandler) GetAxis ¶
func (i *InputHandler) GetAxis(negativeKey, positiveKey Key) float32
GetAxis gets a normalized 1D axis
func (*InputHandler) GetAxis2D ¶
func (i *InputHandler) GetAxis2D(negHorizontalKey, posHorizontalKey, negVerticalKey, posVerticalKey Key) Vector2
GetAxis2D gets a normalized 2D axis based on the keys being pressed
func (*InputHandler) GetButton ¶
func (i *InputHandler) GetButton(button int) bool
GetButton gets if the current button is pressed
func (*InputHandler) GetButtonDown ¶
func (i *InputHandler) GetButtonDown(button int) bool
GetButtonDown gets if the current button has started being pressed
func (*InputHandler) GetButtonUp ¶
func (i *InputHandler) GetButtonUp(button int) bool
GetButtonUp gets if the current button was released
func (*InputHandler) GetKey ¶
func (i *InputHandler) GetKey(key Key) bool
GetKey gets if the current key is pressed
func (*InputHandler) GetKeyDown ¶
func (i *InputHandler) GetKeyDown(key Key) bool
GetKeyDown gets if the current key has started being pressed
func (*InputHandler) GetKeyUp ¶
func (i *InputHandler) GetKeyUp(key Key) bool
GetKeyUp gets if the current key was released
func (*InputHandler) GetMousePosition ¶
func (i *InputHandler) GetMousePosition() Vector2
GetMousePosition gets the current mouse position
func (*InputHandler) GetMouseScroll ¶
func (i *InputHandler) GetMouseScroll() float32
GetMouseScroll gets the current mouse scroll delta
func (*InputHandler) GetMouseX ¶
func (i *InputHandler) GetMouseX() int
GetMouseX gets the current mouse position on the screen in pixels
func (*InputHandler) GetMouseY ¶
func (i *InputHandler) GetMouseY() int
GetMouseY gets the current mouse position on the screen in pixels
type Key ¶
type Key int
Key is a Keycode representation of a keyboard character. use the https://keycode.info/ tool to help identify missing key codes
type Matrix ¶
type Matrix struct { M0 float32 M1 float32 M2 float32 M3 float32 M4 float32 M5 float32 M6 float32 M7 float32 M8 float32 M9 float32 M10 float32 M11 float32 M12 float32 M13 float32 M14 float32 M15 float32 }
Matrix A representation of a 4 x 4 matrix
func NewMatrixFrustum ¶
NewMatrixFrustum generates a Frustum Matrix.
func NewMatrixLookAt ¶
NewMatrixLookAt creates a matrix to look at a target
func NewMatrixOrtho ¶
NewMatrixOrtho creates a orthographic projection
func NewMatrixPerspective ¶
NewMatrixPerspective creates a perspective projection matrix. FOVY is in degrees
func NewMatrixQuaternion ¶
func NewMatrixQuaternion(q Quaternion) Matrix
NewMatrixQuaternion creates a new rotation matrix from a quaternion https://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToMatrix/index.htm
func NewMatrixRotate ¶
NewMatrixRotate creates a rotation matrix based of the axis and radians
func NewMatrixRotateX ¶
NewMatrixRotateX creates a new matrix that is rotated
func NewMatrixRotateXYZ ¶
NewMatrixRotateXYZ new xyz-rotation matrix (in radians)
func NewMatrixRotateY ¶
NewMatrixRotateY creates a new matrix that is rotated
func NewMatrixRotateZ ¶
NewMatrixRotateZ creates a new matrix that is rotated
func NewMatrixScale ¶
NewMatrixScale creates a new scalling matrix
func NewMatrixTransform ¶
NewMatrixTransform creates a new matrix based off a transform
func NewMatrixTranslate ¶
NewMatrixTranslate creates a blank translation matrix from vector
func NewMatrixTranslate32 ¶
NewMatrixTranslate32 creates a blank translation matrix
func NewMatrixTranslate64 ¶
NewMatrixTranslate64 creates a blank translation matrix
func (*Matrix) DecomposePointer ¶
DecomposePointer is an unsafe Decompose. Instead of the values being copied, a pointer to the matrix is cast into a float array pointer and returned.
type Quaternion ¶
Quaternion A represntation of rotations that does not suffer from gimbal lock
func NewQuaternionAxisAngle ¶
func NewQuaternionAxisAngle(axis Vector3, angle float32) Quaternion
NewQuaternionAxisAngle creates a quaternion from an axis and its rotation
func NewQuaternionBetweenVectors ¶
func NewQuaternionBetweenVectors(start, dest Vector3) Quaternion
NewQuaternionBetweenVectors creates a rotation between the two vectors.
func NewQuaternionEuler ¶
func NewQuaternionEuler(euler Vector3) Quaternion
NewQuaternionEuler creates a quaternion from euler angles (roll, yaw, pitch) in radians
func NewQuaternionIdentity ¶
func NewQuaternionIdentity() Quaternion
NewQuaternionIdentity creates a Quaternion Identity (a blank quaternion)
func NewQuaternionLookAt ¶
func NewQuaternionLookAt(eye, center, up Vector3) Quaternion
NewQuaternionLookAt creates a rotation from the eye to the center, with the give up.
func NewQuaternionMatrix ¶
func NewQuaternionMatrix(matrix Matrix) Quaternion
NewQuaternionMatrix converts a pure rotation matrix into a quaternion
func (Quaternion) Backward ¶
func (q Quaternion) Backward() Vector3
Backward returns a directional vector that is represented by this quaternion
func (Quaternion) Decompose ¶
func (q Quaternion) Decompose() []float32
Decompose the quaternion into a slice of floats
func (Quaternion) Down ¶
func (q Quaternion) Down() Vector3
Down returns a directional vector that is represented by this quaternion
func (Quaternion) Forward ¶
func (q Quaternion) Forward() Vector3
Forward returns a directional vector that is represented by this quaternion
func (Quaternion) Left ¶
func (q Quaternion) Left() Vector3
Left returns a directional vector that is represented by this quaternion
func (Quaternion) Lerp ¶
func (q Quaternion) Lerp(target Quaternion, amount float32) Quaternion
Lerp a vector towards another vector
func (Quaternion) Multiply ¶
func (q Quaternion) Multiply(q2 Quaternion) Quaternion
Multiply two Quaternion together, doing queraternion mathmatics
func (Quaternion) Nlerp ¶
func (q Quaternion) Nlerp(target Quaternion, amount float32) Quaternion
Nlerp slerp-optimized interpolation between two quaternions
func (Quaternion) Right ¶
func (q Quaternion) Right() Vector3
Right returns a directional vector that is represented by this quaternion
func (Quaternion) Rotate ¶
func (q Quaternion) Rotate(v Vector3) Vector3
Rotate a vector by the rotation this quaternion represents.
func (Quaternion) Scale ¶
func (q Quaternion) Scale(scale float32) Quaternion
Scale the quaternion (v * scale)
func (Quaternion) Slerp ¶
func (q Quaternion) Slerp(q2 Quaternion, amount float32) Quaternion
Slerp Spherically Lerped
func (Quaternion) SqrLength ¶
func (q Quaternion) SqrLength() float32
SqrLength is the squared length of the quaternion
func (Quaternion) ToAxisAngle ¶
func (q Quaternion) ToAxisAngle() (Vector3, float32)
ToAxisAngle returns the rotation angle and axis for a given quaternion
func (Quaternion) ToEuler ¶
func (q Quaternion) ToEuler() Vector3
ToEuler turns the quaternion into equivalent euler angles (roll, putch, yaw). Values are returned in Degrees
func (Quaternion) ToMatrix ¶
func (q Quaternion) ToMatrix() Matrix
ToMatrix turns the quaternion into a matrix representation
func (Quaternion) Up ¶
func (q Quaternion) Up() Vector3
Up returns a directional vector that is represented by this quaternion
type Rectangle ¶
Rectangle Structure author: Lachee source: https://github.com/raysan5/raylib/blob/master/src/raylib.h
func NewRectangle ¶
NewRectangle creates a new rect
func NewRectangleFromMinMax ¶
NewRectangleFromMinMax creates a new rect
func NewRectangleFromPositionSize ¶
NewRectangleFromPositionSize creates a rectangle out of a position and size
func NewRectangleFromVector4 ¶
NewRectangleFromVector4 creates a rectangle out of a vector4
func NewRectangled ¶
NewRectangled creates a new rect using float64
func (Rectangle) LerpPosition ¶
LerpPosition a rectangle to a target position
func (Rectangle) MaxPosition ¶
MaxPosition gets the maximum position within the bounds
func (Rectangle) MinPosition ¶
MinPosition gets the smallest position the rectangle can be. Alias of Position().
func (Rectangle) SetPosition ¶
SetPosition sets the position of the rectangle
type Shader ¶
type Shader struct {
// contains filtered or unexported fields
}
Shader holds the shaders
func LoadShader ¶
LoadShader loads a shader from code
func LoadShaderFromURL ¶
LoadShaderFromURL loads a shader from a URL
func (*Shader) BindVertexData ¶
func (shader *Shader) BindVertexData(attribute string, bufferLocation GLEnum, buffer WebGLBuffer, bufferSize int, bufferType GLEnum, normalize bool, stride int, offset int)
BindVertexData binds a buffer of vertex data to an attribute
func (*Shader) GetAttribLocation ¶
func (shader *Shader) GetAttribLocation(attribute string) WebGLAttributeLocation
GetAttribLocation gets a location of an attribute
func (*Shader) GetProgram ¶
func (shader *Shader) GetProgram() WebGLShaderProgram
GetProgram gets the shader program
func (*Shader) GetUniformLocation ¶
func (shader *Shader) GetUniformLocation(location string) WebGLUniformLocation
GetUniformLocation returns the location of a specific uniform variable which is part of a given WebGLProgram.
type SliceSprite ¶
SliceSprite is a sliced texture
func NewSliceSprite ¶
func NewSliceSprite(source *Texture, rectangle Rectangle, border Vector2) *SliceSprite
NewSliceSprite a new sprite
func (*SliceSprite) Height ¶
func (spr *SliceSprite) Height() int
Height gets the sprites height in pixels
func (*SliceSprite) Slice ¶
func (spr *SliceSprite) Slice() (Vector2, Vector2)
Slice generates a UV slice for the SpriteRenderer
func (*SliceSprite) Texture ¶
func (spr *SliceSprite) Texture() *Texture
Texture gets the current sprit texture
func (*SliceSprite) Width ¶
func (spr *SliceSprite) Width() int
Width gets the sprites width in pixels
type Sprite ¶
Sprite is a basic implementation of a UVTile. Its a single texture with a rectangle slice.
type SpriteRenderer ¶
type SpriteRenderer struct { Zoom float32 //Zoom is the perspective zoom on the sprites Camera Vector2 //Camera is the position of the camera // contains filtered or unexported fields }
SpriteRenderer renders UVTiles in a batched manner
func NewSpriteRenderer ¶
func NewSpriteRenderer() *SpriteRenderer
NewSpriteRenderer creates a new sprite renderer
func (*SpriteRenderer) Begin ¶
func (b *SpriteRenderer) Begin() *SpriteRenderer
Begin starts a SpriteRenderer
func (*SpriteRenderer) Draw ¶
func (b *SpriteRenderer) Draw(r UVTile, origin Vector2, transform Transform2D, color Color)
Draw a particular texture
func (*SpriteRenderer) End ¶
func (b *SpriteRenderer) End() *SpriteRenderer
End finalises a SpriteRenderer
type Texture ¶
type Texture struct {
// contains filtered or unexported fields
}
Texture is a GPU image
func (*Texture) CreateSprite ¶
CreateSprite creates a sprite
func (*Texture) SetFilter ¶
func (tex *Texture) SetFilter(filter TextureFilter)
SetFilter binds the texture and sets the filtering
func (*Texture) SetImage ¶
SetImage copies the data from the Image into the texture, setting initial filtering.
func (*Texture) SetSampler ¶
func (tex *Texture) SetSampler(sampler WebGLUniformLocation, textureIndex int)
SetSampler updates the texture sampler
func (*Texture) SetWrap ¶
func (tex *Texture) SetWrap(wrap TextureWrap)
SetWrap binds the texture and sets how the texture will be wrapped
type Transform ¶
type Transform struct { Position Vector3 Rotation Quaternion Scale Vector3 }
Transform is a structure of tranlsation, rotation and scale properties
func NewTransform ¶
func NewTransform(translation Vector3, rotation Quaternion, scale Vector3) Transform
NewTransform creates a new transform
func NewTransformIdentity ¶
func NewTransformIdentity() Transform
NewTransformIdentity creates a new blank transform
type Transform2D ¶
Transform2D is a structure of tranlsation, rotation and scale properties
func NewTransform2D ¶
func NewTransform2D(translation Vector2, rotation float32, scale Vector2) Transform2D
NewTransform2D creates a new transform
type UIRenderer ¶
type UIRenderer struct { Zoom float32 // contains filtered or unexported fields }
UIRenderer renders UVTiles in a batched manner
func (*UIRenderer) Draw ¶
func (b *UIRenderer) Draw(rect Rectangle, color Color)
Draw a particular texture
func (*UIRenderer) GetScale ¶
func (b *UIRenderer) GetScale() float32
GetScale gets the current scale
func (*UIRenderer) ScaleInput ¶
func (b *UIRenderer) ScaleInput(state bool)
ScaleInput will scale all the rectangles, so that they are pixel perfect
func (*UIRenderer) Screen2UISpace ¶
func (b *UIRenderer) Screen2UISpace(screen Vector2) Vector2
Screen2UISpace converts the screen cooridinates to UI coords
func (*UIRenderer) SetScale ¶
func (b *UIRenderer) SetScale(scale float32)
SetScale sets how zoomed in the rectangles appear
func (*UIRenderer) SetSprite ¶
func (b *UIRenderer) SetSprite(sprite *SliceSprite)
SetSprite sets teh current sprite
type UVTile ¶
type UVTile interface { //Texture returns the texture Texture() *Texture //Width is the size in pixels of the source image Width() int //Height is the size in pixels of the source image Height() int //Slice returns uv extremes, UV Min and UV Max Slice() (Vector2, Vector2) }
UVTile interface provides methods for sprites
type Vector2 ¶
Vector2 a 2 dimensional vector
func NewVector2 ¶
NewVector2 creates a new vector with defined components
func NewVector2One ¶
func NewVector2One() Vector2
NewVector2One creates a vector that is completely 1
func NewVector2Right ¶
func NewVector2Right() Vector2
NewVector2Right creates a normalized vector pointing right
func NewVector2Up ¶
func NewVector2Up() Vector2
NewVector2Up creates a normalized vector pointing up
func NewVector2Zero ¶
func NewVector2Zero() Vector2
NewVector2Zero creates a vector with all components equaling 0
func NewVector2d ¶
NewVector2d creates a new vector with double precesion float (float64)
func (Vector2) DecomposePointer ¶
DecomposePointer the vector into a slice of floats
func (Vector2) DotProduct ¶
DotProduct of the vector
func (Vector2) Perpendicular ¶
Perpendicular to this vector
func (Vector2) Reflect ¶
Reflect a vector. The mirror normal can be invisioned as a mirror perpendicular to the surface that is hit.
func (Vector2) RotateByRadians ¶
RotateByRadians rotates the vector in radians. Use Deg2Rad to convert degress into radians.
type Vector3 ¶
Vector3 a 3 dimensional vector
func NewVector3 ¶
NewVector3 creates a new vector with defined components
func NewVector3Forward ¶
func NewVector3Forward() Vector3
NewVector3Forward creates a normalized vector pointing forwards
func NewVector3Right ¶
func NewVector3Right() Vector3
NewVector3Right creates a normalized vector pointing right
func NewVector3Up ¶
func NewVector3Up() Vector3
NewVector3Up creates a normalized vector pointing up
func NewVector3Zero ¶
func NewVector3Zero() Vector3
NewVector3Zero creates a vector with all components equaling 0
func NewVector3d ¶
NewVector3d creates a new vector with double precesion float (float64)
func (Vector3) Barycenter ¶
Barycenter computers the coordinates (u, v, w) for the vector with respect to triangle (a, b, c). Assumes vector is on plane with triangle
func (Vector3) CrossProduct ¶
CrossProduct of the vector
func (Vector3) DecomposePointer ¶
DecomposePointer the vector into a slice of floats
func (Vector3) DotProduct ¶
DotProduct of the vector
func (*Vector3) OrthoNormalize ¶
OrthoNormalize makes two vectors normalized and orthogonal to each other
func (Vector3) Perpendicular ¶
Perpendicular to this vector
func (Vector3) Reflect ¶
Reflect a vector. The mirror normal can be invisioned as a mirror perpendicular to the surface that is hit.
type Vector4 ¶
Vector4 A 4 dimensional vector
func NewVector4 ¶
NewVector4 creates a new vector with defined components
func NewVector4Zero ¶
func NewVector4Zero() Vector4
NewVector4Zero creates a vector with all components equaling 0
func NewVector4d ¶
NewVector4d creates a new vector with double precesion float (float64)
func (Vector4) DecomposePointer ¶
DecomposePointer the vector into a slice of floats
func (Vector4) DotProduct ¶
DotProduct of the vector
type WebGL ¶
type WebGL struct {
// contains filtered or unexported fields
}
WebGL is the base class that wraps GL functionality.
func (*WebGL) ActiveTexture ¶
ActiveTexture tells WebGL what texture state will be now modified
func (*WebGL) AttachShader ¶
func (gl *WebGL) AttachShader(shaderProgram WebGLShaderProgram, shader WebGLShader)
AttachShader attaches a shader to the program
func (*WebGL) BindBuffer ¶
func (gl *WebGL) BindBuffer(target GLEnum, buffer WebGLBuffer)
BindBuffer binds a given WebGLBuffer to a target.
func (*WebGL) BindTexture ¶
func (gl *WebGL) BindTexture(target GLEnum, texture WebGLTexture)
BindTexture binds a given WebGLTexture to a target (binding point).
func (*WebGL) BlendFunc ¶
BlendFunc specifies a function that compares incoming pixel depth to the current blending.
func (*WebGL) BufferData ¶
BufferData sets the data of a buffer
func (*WebGL) BufferSubData ¶
BufferSubData updates a subset of a buffer object's data store.
func (*WebGL) ClearColor ¶
ClearColor sets the colour the screen will be cleared to
func (*WebGL) ClearDepth ¶
ClearDepth sets the z value that is set to the depth buffer every frame
func (*WebGL) CompileShader ¶
func (gl *WebGL) CompileShader(shader WebGLShader) error
CompileShader compiles the shader
func (*WebGL) CreateBuffer ¶
func (gl *WebGL) CreateBuffer() WebGLBuffer
CreateBuffer creates a WebGLBuffer object.
func (*WebGL) CreateProgram ¶
func (gl *WebGL) CreateProgram() WebGLShaderProgram
CreateProgram creates a new webgl shader program
func (*WebGL) CreateShader ¶
func (gl *WebGL) CreateShader(shaderType GLEnum) WebGLShader
CreateShader creates a new WebGLShader
func (*WebGL) CreateTexture ¶
func (gl *WebGL) CreateTexture() WebGLTexture
CreateTexture creates a new texture on the GPU
func (*WebGL) DeleteShader ¶
func (gl *WebGL) DeleteShader(shader WebGLShader)
DeleteShader marks a given WebGLShader object for deletion. It will then be deleted whenever the shader is no longer in use.
func (*WebGL) DepthFunc ¶
DepthFunc specifies a function that compares incoming pixel depth to the current depth buffer value.
func (*WebGL) DrawElements ¶
DrawElements renders primitives from array data.
func (*WebGL) EnableVertexAttribArray ¶
func (gl *WebGL) EnableVertexAttribArray(position WebGLAttributeLocation)
EnableVertexAttribArray turns on the generic vertex attribute array at the specified index into the list of attribute arrays.
func (*WebGL) GenerateMipmap ¶
GenerateMipmap creats the Mipmap for a texture
func (*WebGL) GetAttribLocation ¶
func (gl *WebGL) GetAttribLocation(shaderProgram WebGLShaderProgram, attribute string) WebGLAttributeLocation
GetAttribLocation gets a location of an attribute
func (*WebGL) GetProgramInfoLog ¶
func (gl *WebGL) GetProgramInfoLog(shaderProgram WebGLShaderProgram) string
GetProgramInfoLog returns the information log for the specified WebGLProgram object. It contains errors that occurred during failed linking or validation of WebGLProgram objects.
func (*WebGL) GetProgramParameter ¶
func (gl *WebGL) GetProgramParameter(shaderProgram WebGLShaderProgram, param GLEnum) js.Value
GetProgramParameter returns information about the given program.
func (*WebGL) GetShaderInfoLog ¶
func (gl *WebGL) GetShaderInfoLog(shader WebGLShader) string
GetShaderInfoLog returns the information log for the specified WebGLShader object. It contains warnings, debugging and compile information.
func (*WebGL) GetShaderParameter ¶
func (gl *WebGL) GetShaderParameter(shader WebGLShader, param GLEnum) js.Value
GetShaderParameter returns information about the given shader.
func (*WebGL) GetUniformLocation ¶
func (gl *WebGL) GetUniformLocation(shaderProgram WebGLShaderProgram, location string) WebGLUniformLocation
GetUniformLocation returns the location of a specific uniform variable which is part of a given WebGLProgram.
func (*WebGL) IsUndefined ¶
IsUndefined checks if the context is undefined
func (*WebGL) LinkProgram ¶
func (gl *WebGL) LinkProgram(shaderProgram WebGLShaderProgram) error
LinkProgram inks a given WebGLProgram, completing the process of preparing the GPU code for the program's fragment and vertex shaders.
func (*WebGL) NewBuffer ¶
func (gl *WebGL) NewBuffer(target GLEnum, data interface{}, usage GLEnum) WebGLBuffer
NewBuffer creates, binds and sets the data of a new buffer
func (*WebGL) NewProgram ¶
func (gl *WebGL) NewProgram(shaders []WebGLShader) (WebGLShaderProgram, error)
NewProgram creates a new webgl shader program with some shaders and links it
func (*WebGL) NewShader ¶
func (gl *WebGL) NewShader(shaderType GLEnum, sourceCode string) (WebGLShader, error)
NewShader creates, sources and compiles a new shader
func (*WebGL) ShaderSource ¶
func (gl *WebGL) ShaderSource(shader WebGLShader, source string)
ShaderSource sets the shader source code
func (*WebGL) TexImage2D ¶
func (gl *WebGL) TexImage2D(target GLEnum, level int, internalFormat GLEnum, format GLEnum, texelType GLEnum, pixels interface{})
TexImage2D specifies a 2D image
func (*WebGL) TexParameterf ¶
TexParameterf set texture parameters
func (*WebGL) TexParameteri ¶
TexParameteri set texture parameters
func (*WebGL) UnbindTexture ¶
UnbindTexture unbinds the target texture. Alias of bindTexture(target, nil) as WebGLTexture cannot be nil
func (*WebGL) Uniform1f ¶
func (gl *WebGL) Uniform1f(location WebGLUniformLocation, value float32)
Uniform1f specifies values of uniform variables
func (*WebGL) Uniform1fv ¶
func (gl *WebGL) Uniform1fv(location WebGLUniformLocation, value []float32)
Uniform1fv specifies values of uniform variables
func (*WebGL) Uniform1i ¶
func (gl *WebGL) Uniform1i(location WebGLUniformLocation, value int)
Uniform1i specifies values of uniform variables
func (*WebGL) Uniform1iv ¶
func (gl *WebGL) Uniform1iv(location WebGLUniformLocation, value []int)
Uniform1iv specifies values of uniform variables
func (*WebGL) Uniform2f ¶
func (gl *WebGL) Uniform2f(location WebGLUniformLocation, value, value2 float32)
Uniform2f specifies values of uniform variables
func (*WebGL) Uniform2fv ¶
func (gl *WebGL) Uniform2fv(location WebGLUniformLocation, value []float32)
Uniform2fv specifies values of uniform variables
func (*WebGL) Uniform2i ¶
func (gl *WebGL) Uniform2i(location WebGLUniformLocation, value, value2 int)
Uniform2i specifies values of uniform variables
func (*WebGL) Uniform2iv ¶
func (gl *WebGL) Uniform2iv(location WebGLUniformLocation, value []int)
Uniform2iv specifies values of uniform variables
func (*WebGL) Uniform2v ¶
func (gl *WebGL) Uniform2v(location WebGLUniformLocation, value Vector2)
Uniform2v is an alias of Uniform2fv but with Vector support
func (*WebGL) UniformMatrix4fv ¶
func (gl *WebGL) UniformMatrix4fv(location WebGLUniformLocation, matrix Matrix)
UniformMatrix4fv specify matrix values for uniform variables.
func (*WebGL) UseProgram ¶
func (gl *WebGL) UseProgram(shaderProgram WebGLShaderProgram)
UseProgram tells webgl to start using this program
func (*WebGL) VertexAttribPointer ¶
func (gl *WebGL) VertexAttribPointer(position WebGLAttributeLocation, size int, valueType GLEnum, normalized bool, stride int, offset int)
VertexAttribPointer binds the buffer currently bound to gl.ARRAY_BUFFER to a generic vertex attribute of the current vertex buffer object and specifies its layout.
type WebGLAttributeLocation ¶
type WebGLAttributeLocation = int
WebGLAttributeLocation is a representation of a attribute location
type WebGLShaderProgram ¶
WebGLShaderProgram is a JS representation of a shader program
type WebGLUniformLocation ¶
WebGLUniformLocation is a JS representation of a uniform location