Documentation ¶
Index ¶
- Variables
- func DetermineContentFormat(framebuffer render.Framebuffer) render.DataFormat
- func MoreCommands(queue *CommandQueue) bool
- func NewPixelTransferBuffer(info render.BufferInfo) render.Buffer
- func NewUniformBuffer(info render.BufferInfo) render.Buffer
- func PopCommand[T any](queue *CommandQueue) T
- func PopData(queue *CommandQueue, count uint32) []byte
- func PushCommand[T any](queue *CommandQueue, command T)
- func PushData(queue *CommandQueue, data []byte)
- type Buffer
- type CommandBindPipeline
- type CommandBindVertexArray
- type CommandBlendColor
- type CommandBlendEquation
- type CommandBlendFunc
- type CommandColorWrite
- type CommandCopyContentToBuffer
- type CommandCullTest
- type CommandDepthComparison
- type CommandDepthTest
- type CommandDepthWrite
- type CommandDraw
- type CommandDrawIndexed
- type CommandFrontFace
- type CommandHeader
- type CommandKind
- type CommandQueue
- func (q *CommandQueue) BindPipeline(pipeline render.Pipeline)
- func (q *CommandQueue) CopyContentToBuffer(info render.CopyContentToBufferInfo)
- func (q *CommandQueue) Draw(vertexOffset, vertexCount, instanceCount int)
- func (q *CommandQueue) DrawIndexed(indexOffset, indexCount, instanceCount int)
- func (q *CommandQueue) Release()
- func (q *CommandQueue) Reset()
- func (q *CommandQueue) TextureUnit(index int, texture render.Texture)
- func (q *CommandQueue) Uniform1f(location render.UniformLocation, value float32)
- func (q *CommandQueue) Uniform1i(location render.UniformLocation, value int)
- func (q *CommandQueue) Uniform3f(location render.UniformLocation, values [3]float32)
- func (q *CommandQueue) Uniform4f(location render.UniformLocation, values [4]float32)
- func (q *CommandQueue) UniformBufferUnit(index int, buffer render.Buffer)
- func (q *CommandQueue) UniformBufferUnitRange(index int, buffer render.Buffer, offset, size int)
- func (q *CommandQueue) UniformMatrix4f(location render.UniformLocation, values [16]float32)
- func (q *CommandQueue) UpdateBufferData(buffer render.Buffer, info render.BufferUpdateInfo)
- type CommandStencilFunc
- type CommandStencilMask
- type CommandStencilOperation
- type CommandStencilTest
- type CommandTextureUnit
- type CommandTopology
- type CommandUniform1f
- type CommandUniform1i
- type CommandUniform3f
- type CommandUniform4f
- type CommandUniformBufferUnit
- type CommandUniformBufferUnitRange
- type CommandUniformMatrix4f
- type CommandUpdateBufferData
- type Fence
- type Framebuffer
- type Pipeline
- type Program
- type Renderer
- func (r *Renderer) BeginRenderPass(info render.RenderPassInfo)
- func (r *Renderer) BindPipeline(pipeline render.Pipeline)
- func (r *Renderer) CopyContentToTexture(info render.CopyContentToTextureInfo)
- func (r *Renderer) Draw(vertexOffset, vertexCount, instanceCount int)
- func (r *Renderer) DrawIndexed(indexOffset, indexCount, instanceCount int)
- func (r *Renderer) EndRenderPass()
- func (r *Renderer) Invalidate()
- func (r *Renderer) SubmitQueue(queue *CommandQueue)
- func (r *Renderer) TextureUnit(index int, texture render.Texture)
- func (r *Renderer) Uniform1f(location render.UniformLocation, value float32)
- func (r *Renderer) Uniform1i(location render.UniformLocation, value int)
- func (r *Renderer) Uniform3f(location render.UniformLocation, values [3]float32)
- func (r *Renderer) Uniform4f(location render.UniformLocation, values [4]float32)
- func (r *Renderer) UniformBufferUnit(index int, buffer render.Buffer)
- func (r *Renderer) UniformBufferUnitRange(index int, buffer render.Buffer, offset, size int)
- func (r *Renderer) UniformMatrix4f(location render.UniformLocation, values [16]float32)
- type Shader
- type State
- type Texture
- func NewColorTexture2D(info render.ColorTexture2DInfo) *Texture
- func NewColorTextureCube(info render.ColorTextureCubeInfo) *Texture
- func NewDepthStencilTexture2D(info render.DepthStencilTexture2DInfo) *Texture
- func NewDepthTexture2D(info render.DepthTexture2DInfo) *Texture
- func NewStencilTexture2D(info render.StencilTexture2DInfo) *Texture
- type VertexArray
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFramebuffer = &Framebuffer{ id: 0, activeDrawBuffers: [4]bool{true, false, false, false}, }
Functions ¶
func DetermineContentFormat ¶ added in v0.6.0
func DetermineContentFormat(framebuffer render.Framebuffer) render.DataFormat
func MoreCommands ¶
func MoreCommands(queue *CommandQueue) bool
func NewPixelTransferBuffer ¶
func NewPixelTransferBuffer(info render.BufferInfo) render.Buffer
func NewUniformBuffer ¶ added in v0.6.0
func NewUniformBuffer(info render.BufferInfo) render.Buffer
func PopCommand ¶
func PopCommand[T any](queue *CommandQueue) T
func PopData ¶ added in v0.6.0
func PopData(queue *CommandQueue, count uint32) []byte
func PushCommand ¶
func PushCommand[T any](queue *CommandQueue, command T)
func PushData ¶ added in v0.6.0
func PushData(queue *CommandQueue, data []byte)
Types ¶
type Buffer ¶
type Buffer struct { render.BufferObject // contains filtered or unexported fields }
func NewIndexBuffer ¶
func NewIndexBuffer(info render.BufferInfo) *Buffer
func NewVertexBuffer ¶
func NewVertexBuffer(info render.BufferInfo) *Buffer
func (*Buffer) Fetch ¶
func (b *Buffer) Fetch(info render.BufferFetchInfo)
func (*Buffer) Update ¶
func (b *Buffer) Update(info render.BufferUpdateInfo)
type CommandBindPipeline ¶
type CommandBindPipeline struct { ProgramID uint32 // not dynamic Topology CommandTopology CullTest CommandCullTest FrontFace CommandFrontFace DepthTest CommandDepthTest DepthWrite CommandDepthWrite DepthComparison CommandDepthComparison StencilTest CommandStencilTest StencilOpFront CommandStencilOperation StencilOpBack CommandStencilOperation StencilFuncFront CommandStencilFunc StencilFuncBack CommandStencilFunc StencilMaskFront CommandStencilMask StencilMaskBack CommandStencilMask ColorWrite CommandColorWrite BlendEnabled bool // not dynamic BlendEquation CommandBlendEquation BlendFunc CommandBlendFunc BlendColor CommandBlendColor VertexArray CommandBindVertexArray }
type CommandBindVertexArray ¶
type CommandBlendColor ¶
type CommandBlendColor struct {
Color [4]float32
}
type CommandBlendEquation ¶
type CommandBlendFunc ¶
type CommandColorWrite ¶
type CommandColorWrite struct {
Mask [4]bool
}
type CommandCullTest ¶
type CommandDepthComparison ¶
type CommandDepthComparison struct {
Mode uint32
}
type CommandDepthTest ¶
type CommandDepthTest struct {
Enabled bool
}
type CommandDepthWrite ¶
type CommandDepthWrite struct {
Enabled bool
}
type CommandDraw ¶
type CommandDrawIndexed ¶
type CommandFrontFace ¶
type CommandFrontFace struct {
Orientation uint32
}
type CommandHeader ¶
type CommandHeader struct {
Kind CommandKind
}
type CommandKind ¶
type CommandKind uint8
const ( CommandKindBindPipeline CommandKind = iota CommandKindTopology CommandKindCullTest CommandKindFrontFace CommandKindDepthTest CommandKindDepthWrite CommandKindDepthComparison CommandKindStencilTest CommandKindStencilOperation CommandKindStencilFunc CommandKindStencilMask CommandKindColorWrite CommandKindBlendColor CommandKindBlendEquation CommandKindBlendFunc CommandBindKindVertexArray CommandKindUniform1f CommandKindUniform1i CommandKindUniform3f CommandKindUniform4f CommandKindUniformMatrix4f CommandKindUniformBufferUnit CommandKindUniformBufferUnitRange CommandKindTextureUnit CommandKindDraw CommandKindDrawIndexed CommandKindCopyContentToBuffer CommandKindUpdateBufferData )
type CommandQueue ¶
type CommandQueue struct {
// contains filtered or unexported fields
}
func NewCommandQueue ¶
func NewCommandQueue() *CommandQueue
func (*CommandQueue) BindPipeline ¶
func (q *CommandQueue) BindPipeline(pipeline render.Pipeline)
func (*CommandQueue) CopyContentToBuffer ¶
func (q *CommandQueue) CopyContentToBuffer(info render.CopyContentToBufferInfo)
func (*CommandQueue) Draw ¶
func (q *CommandQueue) Draw(vertexOffset, vertexCount, instanceCount int)
func (*CommandQueue) DrawIndexed ¶
func (q *CommandQueue) DrawIndexed(indexOffset, indexCount, instanceCount int)
func (*CommandQueue) Release ¶
func (q *CommandQueue) Release()
func (*CommandQueue) Reset ¶
func (q *CommandQueue) Reset()
func (*CommandQueue) TextureUnit ¶
func (q *CommandQueue) TextureUnit(index int, texture render.Texture)
func (*CommandQueue) Uniform1f ¶
func (q *CommandQueue) Uniform1f(location render.UniformLocation, value float32)
func (*CommandQueue) Uniform1i ¶
func (q *CommandQueue) Uniform1i(location render.UniformLocation, value int)
func (*CommandQueue) Uniform3f ¶
func (q *CommandQueue) Uniform3f(location render.UniformLocation, values [3]float32)
func (*CommandQueue) Uniform4f ¶
func (q *CommandQueue) Uniform4f(location render.UniformLocation, values [4]float32)
func (*CommandQueue) UniformBufferUnit ¶ added in v0.6.0
func (q *CommandQueue) UniformBufferUnit(index int, buffer render.Buffer)
func (*CommandQueue) UniformBufferUnitRange ¶ added in v0.6.0
func (q *CommandQueue) UniformBufferUnitRange(index int, buffer render.Buffer, offset, size int)
func (*CommandQueue) UniformMatrix4f ¶
func (q *CommandQueue) UniformMatrix4f(location render.UniformLocation, values [16]float32)
func (*CommandQueue) UpdateBufferData ¶ added in v0.6.0
func (q *CommandQueue) UpdateBufferData(buffer render.Buffer, info render.BufferUpdateInfo)
type CommandStencilFunc ¶
type CommandStencilMask ¶
type CommandStencilOperation ¶
type CommandStencilTest ¶
type CommandStencilTest struct {
Enabled bool
}
type CommandTextureUnit ¶
type CommandTopology ¶
type CommandTopology struct {
Topology uint32
}
type CommandUniform1f ¶
type CommandUniform1i ¶
type CommandUniform3f ¶
type CommandUniform4f ¶
type CommandUniformBufferUnit ¶ added in v0.6.0
type CommandUniformBufferUnitRange ¶ added in v0.6.0
type CommandUniformMatrix4f ¶
type CommandUpdateBufferData ¶ added in v0.6.0
type Fence ¶
type Fence struct { render.FenceObject // contains filtered or unexported fields }
func (*Fence) Status ¶
func (f *Fence) Status() render.FenceStatus
type Framebuffer ¶
type Framebuffer struct { render.FramebufferObject // contains filtered or unexported fields }
func NewFramebuffer ¶
func NewFramebuffer(info render.FramebufferInfo) *Framebuffer
func (*Framebuffer) Release ¶
func (f *Framebuffer) Release()
type Pipeline ¶
type Pipeline struct { render.PipelineObject ProgramID uint32 Topology CommandTopology CullTest CommandCullTest FrontFace CommandFrontFace DepthTest CommandDepthTest DepthWrite CommandDepthWrite DepthComparison CommandDepthComparison StencilTest CommandStencilTest StencilOpFront CommandStencilOperation StencilOpBack CommandStencilOperation StencilFuncFront CommandStencilFunc StencilFuncBack CommandStencilFunc StencilMaskFront CommandStencilMask StencilMaskBack CommandStencilMask ColorWrite CommandColorWrite BlendEnabled bool BlendColor CommandBlendColor BlendEquation CommandBlendEquation BlendFunc CommandBlendFunc VertexArray CommandBindVertexArray }
func NewPipeline ¶
func NewPipeline(info render.PipelineInfo) *Pipeline
type Program ¶
type Program struct { render.ProgramObject // contains filtered or unexported fields }
func NewProgram ¶
func NewProgram(info render.ProgramInfo) *Program
func (*Program) UniformLocation ¶
func (p *Program) UniformLocation(name string) render.UniformLocation
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer() *Renderer
func (*Renderer) BeginRenderPass ¶
func (r *Renderer) BeginRenderPass(info render.RenderPassInfo)
func (*Renderer) BindPipeline ¶
func (*Renderer) CopyContentToTexture ¶
func (r *Renderer) CopyContentToTexture(info render.CopyContentToTextureInfo)
func (*Renderer) DrawIndexed ¶
func (*Renderer) EndRenderPass ¶
func (r *Renderer) EndRenderPass()
func (*Renderer) Invalidate ¶ added in v0.4.0
func (r *Renderer) Invalidate()
func (*Renderer) SubmitQueue ¶
func (r *Renderer) SubmitQueue(queue *CommandQueue)
func (*Renderer) Uniform1f ¶
func (r *Renderer) Uniform1f(location render.UniformLocation, value float32)
func (*Renderer) Uniform1i ¶
func (r *Renderer) Uniform1i(location render.UniformLocation, value int)
func (*Renderer) Uniform3f ¶
func (r *Renderer) Uniform3f(location render.UniformLocation, values [3]float32)
func (*Renderer) Uniform4f ¶
func (r *Renderer) Uniform4f(location render.UniformLocation, values [4]float32)
func (*Renderer) UniformBufferUnit ¶ added in v0.6.0
func (*Renderer) UniformBufferUnitRange ¶ added in v0.6.0
func (*Renderer) UniformMatrix4f ¶
func (r *Renderer) UniformMatrix4f(location render.UniformLocation, values [16]float32)
type Shader ¶
type Shader struct { render.ShaderObject // contains filtered or unexported fields }
func NewFragmentShader ¶
func NewFragmentShader(info render.ShaderInfo) *Shader
func NewVertexShader ¶
func NewVertexShader(info render.ShaderInfo) *Shader
type State ¶ added in v0.4.0
type State struct { CullTest bool CullFace uint32 FrontFace uint32 DepthTest bool DepthMask bool DepthComparison uint32 StencilTest bool StencilOpStencilFailFront uint32 StencilOpDepthFailFront uint32 StencilOpPassFront uint32 StencilOpStencilFailBack uint32 StencilOpDepthFailBack uint32 StencilOpPassBack uint32 StencilComparisonFuncFront uint32 StencilComparisonRefFront int32 StencilComparisonMaskFront uint32 StencilComparisonFuncBack uint32 StencilComparisonRefBack int32 StencilComparisonMaskBack uint32 StencilMaskFront uint32 StencilMaskBack uint32 ColorMask [4]bool Blending bool BlendColor [4]float32 BlendModeRGB uint32 BlendModeAlpha uint32 BlendSourceFactorRGB uint32 BlendDestinationFactorRGB uint32 BlendSourceFactorAlpha uint32 BlendDestinationFactorAlpha uint32 }
type Texture ¶
type Texture struct { render.TextureObject // contains filtered or unexported fields }
func NewColorTexture2D ¶
func NewColorTexture2D(info render.ColorTexture2DInfo) *Texture
func NewColorTextureCube ¶
func NewColorTextureCube(info render.ColorTextureCubeInfo) *Texture
func NewDepthStencilTexture2D ¶
func NewDepthStencilTexture2D(info render.DepthStencilTexture2DInfo) *Texture
func NewDepthTexture2D ¶
func NewDepthTexture2D(info render.DepthTexture2DInfo) *Texture
func NewStencilTexture2D ¶
func NewStencilTexture2D(info render.StencilTexture2DInfo) *Texture
type VertexArray ¶
type VertexArray struct { render.VertexArrayObject // contains filtered or unexported fields }
func NewVertexArray ¶
func NewVertexArray(info render.VertexArrayInfo) *VertexArray
func (*VertexArray) Release ¶
func (a *VertexArray) Release()
Click to show internal directories.
Click to hide internal directories.