Versions in this module Expand all Collapse all v1 v1.0.0 Oct 3, 2023 Changes in this version + const MaxArrayLength — js/wasm + type AttribLocation js.Value — js/wasm + type BlendFactor js.Value — js/wasm + type Buffer js.Value — js/wasm + type BufferBit int — js/wasm + type BufferTarget js.Value — js/wasm + type BufferUsage js.Value — js/wasm + type Capability js.Value — js/wasm + type DrawMode js.Value — js/wasm + type GlType js.Value — js/wasm + type Program js.Value — js/wasm + func CreateProgram(w *WebGL, vertexShaderCode, fragmentShaderCode string) (*Program, error) + type ProgramParameterBool js.Value — js/wasm + type Shader js.Value — js/wasm + func CompileShader(w *WebGL, code string, t ShaderType) (*Shader, error) + type ShaderParameterBool js.Value — js/wasm + type ShaderType js.Value — js/wasm + type Texture js.Value — js/wasm + func LoadTexture(w *WebGL, image js.Value) *Texture + type TextureFormat js.Value — js/wasm + type TextureTarget js.Value — js/wasm + type TextureUnit js.Value — js/wasm + type UniformLocation js.Value — js/wasm + type WebGL struct — js/wasm + ARRAY_BUFFER BufferTarget + BLEND Capability + COLOR_BUFFER_BIT BufferBit + COMPILE_STATUS ShaderParameterBool + DEPTH_BUFFER_BIT BufferBit + DYNAMIC_DRAW BufferUsage + FLOAT GlType + FRAGMENT_SHADER ShaderType + LINK_STATUS ProgramParameterBool + ONE BlendFactor + ONE_MINUS_SRC_ALPHA BlendFactor + POINTS DrawMode + RGBA TextureFormat + SHORT GlType + SRC_ALPHA BlendFactor + STATIC_DRAW BufferUsage + TEXTURE0 TextureUnit + TEXTURE_2D TextureTarget + TRIANGLES DrawMode + UNSIGNED_BYTE GlType + VERTEX_SHADER ShaderType + ZERO BlendFactor + func InitWebgl(canvas js.Value) (*WebGL, error) + func (w *WebGL) ActiveTexture(u TextureUnit) + func (w *WebGL) AttachShader(p *Program, s *Shader) + func (w *WebGL) BindBuffer(t BufferTarget, b *Buffer) + func (w *WebGL) BindTexture(tt TextureTarget, t *Texture) + func (w *WebGL) BlendFunc(sfactor, dfactor BlendFactor) + func (w *WebGL) BufferDataF32(t BufferTarget, a []float32, u BufferUsage) + func (w *WebGL) BufferDataSize(t BufferTarget, size int, u BufferUsage) + func (w *WebGL) BufferSubDataF32(t BufferTarget, offset int, a []float32) + func (w *WebGL) BufferSubDataI16(t BufferTarget, offset int, a []int16) + func (w *WebGL) Clear(colorBits BufferBit) + func (w *WebGL) ClearColor(r, g, b, a float64) + func (w *WebGL) CompileShader(s *Shader) + func (w *WebGL) CreateBuffer() *Buffer + func (w *WebGL) CreateProgram() *Program + func (w *WebGL) CreateShader(t ShaderType) *Shader + func (w *WebGL) CreateTexture() *Texture + func (w *WebGL) DrawArrays(mode DrawMode, first, size int) + func (w *WebGL) Enable(c Capability) + func (w *WebGL) EnableVertexAttribArray(a AttribLocation) + func (w *WebGL) GenerateMipmap(target TextureTarget) + func (w *WebGL) GetAttribLocation(p *Program, name string) AttribLocation + func (w *WebGL) GetError() js.Value + func (w *WebGL) GetProgramInfoLog(p *Program) string + func (w *WebGL) GetProgramParameterBool(p *Program, param ProgramParameterBool) bool + func (w *WebGL) GetShaderInfoLog(s *Shader) string + func (w *WebGL) GetShaderParameterBool(s *Shader, param ShaderParameterBool) bool + func (w *WebGL) GetUniformLocation(p *Program, name string) UniformLocation + func (w *WebGL) LinkProgram(p *Program) + func (w *WebGL) ShaderSource(s *Shader, code string) + func (w *WebGL) TexImage2D(target TextureTarget, level int, internalFormat TextureFormat, ...) + func (w *WebGL) Uniform1i(u UniformLocation, v int) + func (w *WebGL) Uniform2fv(u UniformLocation, v [2]float32) + func (w *WebGL) Uniform4fv(u UniformLocation, v [4]float32) + func (w *WebGL) UseProgram(p *Program) + func (w *WebGL) ValidateProgram(p *Program) + func (w *WebGL) VertexAttribPointer(a AttribLocation, size int, arrayType GlType, normalized bool, ...)