Documentation ¶
Index ¶
- type AttribLocation
- type AttribLocationGetter
- type Buffer
- type BufferType
- type BufferUsage
- type Context
- func (c *Context) BindElementArrayBuffer(b Buffer)
- func (c *Context) BindTexture(t Texture)
- func (c *Context) BufferSubData(bufferType BufferType, data []int16)
- func (c *Context) Check()
- func (c *Context) DeleteFramebuffer(f Framebuffer)
- func (c *Context) DeleteShader(s Shader)
- func (c *Context) DeleteTexture(t Texture)
- func (c *Context) DisableVertexAttribArray(p Program, location string)
- func (c *Context) DrawElements(mode Mode, len int)
- func (c *Context) EnableVertexAttribArray(p Program, location string)
- func (c *Context) FillFramebuffer(r, g, b, a float64) error
- func (c *Context) FramebufferPixels(f Framebuffer, width, height int) ([]uint8, error)
- func (c *Context) GetAttribLocation(p Program, location string) AttribLocation
- func (c *Context) GetUniformLocation(p Program, location string) UniformLocation
- func (c *Context) GlslHighpSupported() bool
- func (c *Context) NewBuffer(bufferType BufferType, v interface{}, bufferUsage BufferUsage) Buffer
- func (c *Context) NewFramebuffer(t Texture) (Framebuffer, error)
- func (c *Context) NewProgram(shaders []Shader) (Program, error)
- func (c *Context) NewShader(shaderType ShaderType, source string) (Shader, error)
- func (c *Context) NewTexture(width, height int, pixels []uint8, filter Filter) (Texture, error)
- func (c *Context) SetViewport(f Framebuffer, width, height int) error
- func (c *Context) TexSubImage2D(p []uint8, width, height int)
- func (c *Context) UniformFloats(p Program, location string, v []float32)
- func (c *Context) UniformInt(p Program, location string, v int)
- func (c *Context) UseProgram(p Program)
- func (c *Context) VertexAttribPointer(p Program, location string, signed bool, normalize bool, stride int, size int, ...)
- type Filter
- type Framebuffer
- type Mode
- type Program
- type ProgramID
- type Shader
- type ShaderType
- type Texture
- type UniformLocation
- type UniformLocationGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttribLocation ¶
type AttribLocation int
func GetAttribLocation ¶
func GetAttribLocation(g AttribLocationGetter, p Program, location string) AttribLocation
type AttribLocationGetter ¶
type AttribLocationGetter interface {
GetAttribLocation(p Program, location string) AttribLocation
}
type BufferType ¶
type BufferType int
type BufferUsage ¶
type BufferUsage int
type Context ¶
type Context struct { Nearest Filter Linear Filter VertexShader ShaderType FragmentShader ShaderType ArrayBuffer BufferType ElementArrayBuffer BufferType DynamicDraw BufferUsage StaticDraw BufferUsage Triangles Mode Lines Mode // contains filtered or unexported fields }
func NewContext ¶
func NewContext() *Context
func (*Context) BindElementArrayBuffer ¶
func (*Context) BindTexture ¶
func (*Context) BufferSubData ¶
func (c *Context) BufferSubData(bufferType BufferType, data []int16)
func (*Context) DeleteFramebuffer ¶
func (c *Context) DeleteFramebuffer(f Framebuffer)
func (*Context) DeleteShader ¶
func (*Context) DeleteTexture ¶
func (*Context) DisableVertexAttribArray ¶
func (*Context) DrawElements ¶
func (*Context) EnableVertexAttribArray ¶
func (*Context) FillFramebuffer ¶
func (*Context) FramebufferPixels ¶
func (c *Context) FramebufferPixels(f Framebuffer, width, height int) ([]uint8, error)
func (*Context) GetAttribLocation ¶
func (c *Context) GetAttribLocation(p Program, location string) AttribLocation
func (*Context) GetUniformLocation ¶
func (c *Context) GetUniformLocation(p Program, location string) UniformLocation
func (*Context) GlslHighpSupported ¶
func (*Context) NewBuffer ¶
func (c *Context) NewBuffer(bufferType BufferType, v interface{}, bufferUsage BufferUsage) Buffer
func (*Context) NewFramebuffer ¶
func (c *Context) NewFramebuffer(t Texture) (Framebuffer, error)
func (*Context) NewShader ¶
func (c *Context) NewShader(shaderType ShaderType, source string) (Shader, error)
func (*Context) NewTexture ¶
func (*Context) SetViewport ¶
func (c *Context) SetViewport(f Framebuffer, width, height int) error
func (*Context) TexSubImage2D ¶
func (*Context) UniformFloats ¶
func (*Context) UseProgram ¶
type ShaderType ¶
type ShaderType int
type UniformLocation ¶
func GetUniformLocation ¶
func GetUniformLocation(g UniformLocationGetter, p Program, location string) UniformLocation
type UniformLocationGetter ¶
type UniformLocationGetter interface {
GetUniformLocation(p Program, location string) UniformLocation
}
Click to show internal directories.
Click to hide internal directories.