Documentation ¶
Index ¶
- Variables
- func Init(runOnMainThread func(func() error) error)
- type Buffer
- type BufferType
- type BufferUsage
- type CompositeMode
- type Context
- func (c *Context) BindElementArrayBuffer(b Buffer)
- func (c *Context) BindScreenFramebuffer()
- func (c *Context) BindTexture(t Texture)
- func (c *Context) BlendFunc(mode CompositeMode)
- func (c *Context) BufferSubData(bufferType BufferType, data []float32)
- func (c *Context) DeleteBuffer(b Buffer)
- func (c *Context) DeleteFramebuffer(f Framebuffer)
- func (c *Context) DeleteProgram(p Program)
- 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, offsetInBytes int)
- func (c *Context) EnableVertexAttribArray(p Program, location string)
- func (c *Context) FillFramebuffer(r, g, b, a float32) error
- func (c *Context) Flush()
- func (c *Context) FramebufferPixels(f Framebuffer, width, height int) ([]uint8, error)
- func (c *Context) IsTexture(t Texture) bool
- func (c *Context) NewArrayBuffer(size int) Buffer
- func (c *Context) NewElementArrayBuffer(indices []uint16) Buffer
- func (c *Context) NewFramebuffer(texture 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) (Texture, error)
- func (c *Context) Reset() error
- func (c *Context) ResetViewportSize()
- func (c *Context) ScreenFramebuffer() Framebuffer
- func (c *Context) SetViewport(f Framebuffer, width, height int)
- 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, size int, dataType DataType, stride int, ...)
- type DataType
- type Framebuffer
- type Mode
- type Program
- type Shader
- type ShaderType
- type Texture
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VertexShader ShaderType FragmentShader ShaderType ArrayBuffer BufferType ElementArrayBuffer BufferType DynamicDraw BufferUsage StaticDraw BufferUsage Triangles Mode Lines Mode Short DataType Float DataType )
Functions ¶
Types ¶
type BufferType ¶
type BufferType int
type BufferUsage ¶
type BufferUsage int
type CompositeMode ¶
type CompositeMode int
const ( CompositeModeSourceOver CompositeMode = iota // This value must be 0 (= initial value) CompositeModeClear CompositeModeCopy CompositeModeDestination CompositeModeDestinationOver CompositeModeSourceIn CompositeModeDestinationIn CompositeModeSourceOut CompositeModeDestinationOut CompositeModeSourceAtop CompositeModeDestinationAtop CompositeModeXor CompositeModeLighter CompositeModeUnknown )
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func GetContext ¶
func GetContext() *Context
func (*Context) BindElementArrayBuffer ¶
func (*Context) BindScreenFramebuffer ¶
func (c *Context) BindScreenFramebuffer()
func (*Context) BindTexture ¶
func (*Context) BlendFunc ¶
func (c *Context) BlendFunc(mode CompositeMode)
func (*Context) BufferSubData ¶
func (c *Context) BufferSubData(bufferType BufferType, data []float32)
func (*Context) DeleteBuffer ¶
func (*Context) DeleteFramebuffer ¶
func (c *Context) DeleteFramebuffer(f Framebuffer)
func (*Context) DeleteProgram ¶
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) NewArrayBuffer ¶ added in v1.6.0
func (*Context) NewElementArrayBuffer ¶ added in v1.6.0
func (*Context) NewFramebuffer ¶
func (c *Context) NewFramebuffer(texture Texture) (Framebuffer, error)
func (*Context) NewShader ¶
func (c *Context) NewShader(shaderType ShaderType, source string) (Shader, error)
func (*Context) NewTexture ¶
func (*Context) ResetViewportSize ¶
func (c *Context) ResetViewportSize()
func (*Context) ScreenFramebuffer ¶
func (c *Context) ScreenFramebuffer() Framebuffer
func (*Context) SetViewport ¶
func (c *Context) SetViewport(f Framebuffer, width, height int)
func (*Context) TexSubImage2D ¶
func (*Context) UniformFloats ¶
func (*Context) UseProgram ¶
type Framebuffer ¶
type Framebuffer uint32
type ShaderType ¶
type ShaderType int
Click to show internal directories.
Click to hide internal directories.