Documentation

Index

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

    func NewBackend(ctx Context) (*Backend, error)

      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 (b *Backend) BindIndexBuffer(buf backend.Buffer)

      func (*Backend) BindInputLayout

      func (b *Backend) BindInputLayout(l backend.InputLayout)

      func (*Backend) BindProgram

      func (b *Backend) BindProgram(prog backend.Program)

      func (*Backend) BindTexture

      func (b *Backend) BindTexture(unit int, t backend.Texture)

      func (*Backend) BindVertexBuffer

      func (b *Backend) BindVertexBuffer(buf backend.Buffer, stride, offset int)

      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) Caps

      func (b *Backend) Caps() backend.Caps

      func (*Backend) Clear

      func (b *Backend) Clear(colR, colG, colB, colA float32)

      func (*Backend) ClearDepth

      func (b *Backend) ClearDepth(d float32)

      func (*Backend) CurrentFramebuffer

      func (b *Backend) CurrentFramebuffer() backend.Framebuffer

      func (*Backend) DepthFunc

      func (b *Backend) DepthFunc(f backend.DepthFunc)

      func (*Backend) DepthMask

      func (b *Backend) DepthMask(mask bool)

      func (*Backend) DispatchCompute

      func (b *Backend) DispatchCompute(x, y, z int)

      func (*Backend) DrawArrays

      func (b *Backend) DrawArrays(mode backend.DrawMode, off, count int)

      func (*Backend) DrawElements

      func (b *Backend) DrawElements(mode backend.DrawMode, off, count int)

      func (*Backend) EndFrame

      func (b *Backend) EndFrame()

      func (*Backend) IsTimeContinuous

      func (b *Backend) IsTimeContinuous() bool

      func (*Backend) MemoryBarrier

      func (b *Backend) MemoryBarrier()

      func (*Backend) NewBuffer

      func (b *Backend) NewBuffer(typ backend.BufferBinding, size int) (backend.Buffer, error)

      func (*Backend) NewComputeProgram

      func (b *Backend) NewComputeProgram(src backend.ShaderSources) (backend.Program, error)

      func (*Backend) NewFramebuffer

      func (b *Backend) NewFramebuffer(tex backend.Texture, depthBits int) (backend.Framebuffer, error)

      func (*Backend) NewImmutableBuffer

      func (b *Backend) NewImmutableBuffer(typ backend.BufferBinding, data []byte) (backend.Buffer, error)

      func (*Backend) NewInputLayout

      func (b *Backend) NewInputLayout(vs backend.ShaderSources, layout []backend.InputDesc) (backend.InputLayout, error)

      func (*Backend) NewProgram

      func (b *Backend) NewProgram(vertShader, fragShader backend.ShaderSources) (backend.Program, error)

      func (*Backend) NewTexture

      func (b *Backend) NewTexture(format backend.TextureFormat, width, height int, minFilter, magFilter backend.TextureFilter, binding backend.BufferBinding) (backend.Texture, error)

      func (*Backend) NewTimer

      func (b *Backend) NewTimer() backend.Timer

      func (*Backend) SetBlend

      func (b *Backend) SetBlend(enable bool)

      func (*Backend) SetDepthTest

      func (b *Backend) SetDepthTest(enable bool)

      func (*Backend) Viewport

      func (b *Backend) Viewport(x, y, width, height int)

      type Context

      type Context = glimpl.Context

      Source Files