Documentation
Index ¶
- Constants
- 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(layout backend.InputLayout)
- func (b *Backend) BindProgram(prog backend.Program)
- func (b *Backend) BindTexture(unit int, tex backend.Texture)
- func (b *Backend) BindVertexBuffer(buf backend.Buffer, stride, offset int)
- func (b *Backend) BlendFunc(sfactor, dfactor backend.BlendFactor)
- func (b *Backend) Caps() backend.Caps
- func (b *Backend) Clear(colr, colg, colb, cola float32)
- func (b *Backend) ClearDepth(depth 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(shader 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(vertexShader backend.ShaderSources, layout []backend.InputDesc) (backend.InputLayout, error)
- func (b *Backend) NewProgram(vertexShader, fragmentShader 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 Buffer
- type Device
- type ErrorCode
- type Framebuffer
- type InputLayout
- type Program
- type SwapChain
- type Texture
Constants ¶
View Source
const ( DXGI_STATUS_OCCLUDED = 0x087A0001 DXGI_ERROR_DEVICE_RESET = 0x887A0007 DXGI_ERROR_DEVICE_REMOVED = 0x887A0005 D3DDDIERR_DEVICEREMOVED = 1<<31 | 0x876<<16 | 2160 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func NewBackend ¶
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(layout backend.InputLayout)
func (*Backend) BindProgram ¶
func (*Backend) BindVertexBuffer ¶
func (*Backend) BlendFunc ¶
func (b *Backend) BlendFunc(sfactor, dfactor backend.BlendFactor)
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(vertexShader 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, bindings backend.BufferBinding) (backend.Texture, error)
func (*Backend) SetDepthTest ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func (*Device) CreateSwapChain ¶
type Framebuffer ¶
type Framebuffer struct {
// contains filtered or unexported fields
}
func (*Framebuffer) Invalidate ¶
func (f *Framebuffer) Invalidate()
func (*Framebuffer) ReadPixels ¶
func (f *Framebuffer) ReadPixels(src image.Rectangle, pixels []byte) error
func (*Framebuffer) Release ¶
func (f *Framebuffer) Release()
type InputLayout ¶
type InputLayout struct {
// contains filtered or unexported fields
}
func (*InputLayout) Release ¶
func (l *InputLayout) Release()
type Program ¶
type Program struct {
// contains filtered or unexported fields
}
func (*Program) SetFragmentUniforms ¶
func (*Program) SetStorageBuffer ¶
func (*Program) SetVertexUniforms ¶
type SwapChain ¶
type SwapChain struct {
// contains filtered or unexported fields
}
func (*SwapChain) Framebuffer ¶
func (s *SwapChain) Framebuffer(d *Device) (*Framebuffer, error)
GOOS=windows, GOARCH=amd64