Documentation
Index ¶
- type Backend
- func (b *Backend) BeginFrame()
- func (b *Backend) BindFramebuffer(fbo backend.Framebuffer)
- func (b *Backend) BindImageTexture(unit int, tex backend.Texture, access backend.AccessBits, ...)
- func (b *Backend) BindIndexBuffer(buf backend.Buffer)
- func (b *Backend) BindInputLayout(l backend.InputLayout)
- func (b *Backend) BindProgram(prog backend.Program)
- func (b *Backend) BindTexture(unit int, t backend.Texture)
- func (b *Backend) BindVertexBuffer(buf backend.Buffer, stride, offset int)
- func (b *Backend) BlendFunc(sfactor, dfactor backend.BlendFactor)
- func (b *Backend) BlitFramebuffer(dst, src backend.Framebuffer, srect, drect image.Rectangle)
- func (b *Backend) Caps() backend.Caps
- func (b *Backend) Clear(colR, colG, colB, colA float32)
- func (b *Backend) ClearDepth(d float32)
- func (b *Backend) CurrentFramebuffer() backend.Framebuffer
- func (b *Backend) DepthFunc(f backend.DepthFunc)
- func (b *Backend) DepthMask(mask bool)
- func (b *Backend) DispatchCompute(x, y, z int)
- func (b *Backend) DrawArrays(mode backend.DrawMode, off, count int)
- func (b *Backend) DrawElements(mode backend.DrawMode, off, count int)
- func (b *Backend) EndFrame()
- func (b *Backend) IsTimeContinuous() bool
- func (b *Backend) MemoryBarrier()
- func (b *Backend) NewBuffer(typ backend.BufferBinding, size int) (backend.Buffer, error)
- func (b *Backend) NewComputeProgram(src backend.ShaderSources) (backend.Program, error)
- func (b *Backend) NewFramebuffer(tex backend.Texture, depthBits int) (backend.Framebuffer, error)
- func (b *Backend) NewImmutableBuffer(typ backend.BufferBinding, data []byte) (backend.Buffer, error)
- func (b *Backend) NewInputLayout(vs backend.ShaderSources, layout []backend.InputDesc) (backend.InputLayout, error)
- func (b *Backend) NewProgram(vertShader, fragShader backend.ShaderSources) (backend.Program, error)
- func (b *Backend) NewTexture(format backend.TextureFormat, width, height int, ...) (backend.Texture, error)
- func (b *Backend) NewTimer() backend.Timer
- func (b *Backend) SetBlend(enable bool)
- func (b *Backend) SetDepthTest(enable bool)
- func (b *Backend) Viewport(x, y, width, height int)
- type Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements backend.Device.
func NewBackend ¶
NewBackend returns a new Backend.
Pass a WebGL context if GOOS is "js", otherwise pass nil for the current context.
func (*Backend) BeginFrame ¶
func (b *Backend) BeginFrame()
func (*Backend) BindFramebuffer ¶
func (b *Backend) BindFramebuffer(fbo backend.Framebuffer)
func (*Backend) BindImageTexture ¶
func (b *Backend) BindImageTexture(unit int, tex backend.Texture, access backend.AccessBits, f backend.TextureFormat)
func (*Backend) BindIndexBuffer ¶
func (*Backend) BindInputLayout ¶
func (b *Backend) BindInputLayout(l backend.InputLayout)
func (*Backend) BindProgram ¶
func (*Backend) BindVertexBuffer ¶
func (*Backend) BlendFunc ¶
func (b *Backend) BlendFunc(sfactor, dfactor backend.BlendFactor)
func (*Backend) BlitFramebuffer ¶
func (b *Backend) BlitFramebuffer(dst, src backend.Framebuffer, srect, drect image.Rectangle)
func (*Backend) ClearDepth ¶
func (*Backend) CurrentFramebuffer ¶
func (b *Backend) CurrentFramebuffer() backend.Framebuffer
func (*Backend) DispatchCompute ¶
func (*Backend) DrawElements ¶
func (*Backend) IsTimeContinuous ¶
func (*Backend) MemoryBarrier ¶
func (b *Backend) MemoryBarrier()
func (*Backend) NewComputeProgram ¶
func (*Backend) NewFramebuffer ¶
func (*Backend) NewImmutableBuffer ¶
func (*Backend) NewInputLayout ¶
func (b *Backend) NewInputLayout(vs backend.ShaderSources, layout []backend.InputDesc) (backend.InputLayout, error)
func (*Backend) NewProgram ¶
func (*Backend) NewTexture ¶
func (b *Backend) NewTexture(format backend.TextureFormat, width, height int, minFilter, magFilter backend.TextureFilter, binding backend.BufferBinding) (backend.Texture, error)