Documentation
¶
Rendered for js/wasm
Index ¶
- Constants
- type AttribLocation
- type BlendFactor
- type Buffer
- type BufferBit
- type BufferTarget
- type BufferUsage
- type Capability
- type DrawMode
- type GlType
- type Program
- type ProgramParameterBool
- type Shader
- type ShaderParameterBool
- type ShaderType
- type Texture
- type TextureFormat
- type TextureTarget
- type TextureUnit
- type UniformLocation
- type WebGL
- 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, ...)
Constants ¶
View Source
const MaxArrayLength = 3 * 2 * 2 * 1000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttribLocation ¶
type BlendFactor ¶
type BufferTarget ¶
type BufferUsage ¶
type Capability ¶
type ProgramParameterBool ¶
type Shader ¶
func CompileShader ¶
func CompileShader(w *WebGL, code string, t ShaderType) (*Shader, error)
type ShaderParameterBool ¶
type ShaderType ¶
type TextureFormat ¶
type TextureTarget ¶
type TextureUnit ¶
type UniformLocation ¶
type WebGL ¶
type WebGL struct { BLEND Capability COLOR_BUFFER_BIT BufferBit DEPTH_BUFFER_BIT BufferBit ARRAY_BUFFER BufferTarget STATIC_DRAW BufferUsage DYNAMIC_DRAW BufferUsage TEXTURE_2D TextureTarget RGBA TextureFormat TEXTURE0 TextureUnit ZERO BlendFactor ONE BlendFactor SRC_ALPHA BlendFactor ONE_MINUS_SRC_ALPHA BlendFactor VERTEX_SHADER ShaderType FRAGMENT_SHADER ShaderType LINK_STATUS ProgramParameterBool COMPILE_STATUS ShaderParameterBool POINTS DrawMode TRIANGLES DrawMode UNSIGNED_BYTE GlType FLOAT GlType SHORT GlType // contains filtered or unexported fields }
func (*WebGL) ActiveTexture ¶
func (w *WebGL) ActiveTexture(u TextureUnit)
func (*WebGL) AttachShader ¶
func (*WebGL) BindBuffer ¶
func (w *WebGL) BindBuffer(t BufferTarget, b *Buffer)
func (*WebGL) BindTexture ¶
func (w *WebGL) BindTexture(tt TextureTarget, t *Texture)
func (*WebGL) BlendFunc ¶
func (w *WebGL) BlendFunc(sfactor, dfactor BlendFactor)
func (*WebGL) BufferDataF32 ¶
func (w *WebGL) BufferDataF32(t BufferTarget, a []float32, u BufferUsage)
func (*WebGL) BufferDataSize ¶
func (w *WebGL) BufferDataSize(t BufferTarget, size int, u BufferUsage)
func (*WebGL) BufferSubDataF32 ¶
func (w *WebGL) BufferSubDataF32(t BufferTarget, offset int, a []float32)
func (*WebGL) BufferSubDataI16 ¶
func (w *WebGL) BufferSubDataI16(t BufferTarget, offset int, a []int16)
func (*WebGL) ClearColor ¶
func (*WebGL) CompileShader ¶
func (*WebGL) CreateBuffer ¶
func (*WebGL) CreateProgram ¶
func (*WebGL) CreateShader ¶
func (w *WebGL) CreateShader(t ShaderType) *Shader
func (*WebGL) CreateTexture ¶
func (*WebGL) DrawArrays ¶
func (*WebGL) Enable ¶
func (w *WebGL) Enable(c Capability)
func (*WebGL) EnableVertexAttribArray ¶
func (w *WebGL) EnableVertexAttribArray(a AttribLocation)
func (*WebGL) GenerateMipmap ¶
func (w *WebGL) GenerateMipmap(target TextureTarget)
func (*WebGL) GetAttribLocation ¶
func (w *WebGL) GetAttribLocation(p *Program, name string) AttribLocation
func (*WebGL) GetProgramInfoLog ¶
func (*WebGL) GetProgramParameterBool ¶
func (w *WebGL) GetProgramParameterBool(p *Program, param ProgramParameterBool) bool
func (*WebGL) GetShaderInfoLog ¶
func (*WebGL) GetShaderParameterBool ¶
func (w *WebGL) GetShaderParameterBool(s *Shader, param ShaderParameterBool) bool
func (*WebGL) GetUniformLocation ¶
func (w *WebGL) GetUniformLocation(p *Program, name string) UniformLocation
func (*WebGL) LinkProgram ¶
func (*WebGL) ShaderSource ¶
func (*WebGL) TexImage2D ¶
func (w *WebGL) TexImage2D(target TextureTarget, level int, internalFormat TextureFormat, format TextureFormat, type_ GlType, pixels js.Value)
func (*WebGL) Uniform1i ¶
func (w *WebGL) Uniform1i(u UniformLocation, v int)
func (*WebGL) Uniform2fv ¶
func (w *WebGL) Uniform2fv(u UniformLocation, v [2]float32)
func (*WebGL) Uniform4fv ¶
func (w *WebGL) Uniform4fv(u UniformLocation, v [4]float32)
func (*WebGL) UseProgram ¶
func (*WebGL) ValidateProgram ¶
func (*WebGL) VertexAttribPointer ¶
Click to show internal directories.
Click to hide internal directories.