Documentation
¶
Index ¶
- type Backend
- type GpuMesh
- func (m *GpuMesh) Bind(cmd *command.Buffer)
- func (m *GpuMesh) Bounds() shape.Sphere
- func (m *GpuMesh) Draw(cmd command.DrawIndexedBuffer, instanceOffset int)
- func (m *GpuMesh) DrawInstanced(cmd command.DrawIndexedBuffer, instanceOffset, instanceCount int)
- func (m *GpuMesh) Key() string
- func (m *GpuMesh) Version() int
- type Key
- type Keyed
- type MeshCache
- type Pipeline
- type PipelineCache
- type SamplerCache
- type SamplerHandle
- type ShaderCache
- type T
- type TextureCache
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GpuMesh ¶
type GpuMesh struct { Vertices buffer.Block Indices buffer.Block IndexCount int IndexOffset int VertexOffset int // contains filtered or unexported fields }
Represents a mesh stored in a (sub)region of vertex/index buffers
func (*GpuMesh) DrawInstanced ¶
func (m *GpuMesh) DrawInstanced(cmd command.DrawIndexedBuffer, instanceOffset, instanceCount int)
type MeshCache ¶
func NewMeshBlockCache ¶
type Pipeline ¶
type PipelineCache ¶
func NewPipelineCache ¶
func NewPipelineCache(dev *device.Device, shaders ShaderCache, pass *renderpass.Renderpass, layout *pipeline.Layout) PipelineCache
type SamplerCache ¶
type SamplerCache interface { T[assets.Texture, *SamplerHandle] // Assign a handle to a texture directly Assign(*texture.Texture) *SamplerHandle // Writes descriptor values to the given Sampler Array. Flush(*descriptor.SamplerArray) // Size returns the maximum number of samplers in the cache. Size() int }
func NewSamplerCache ¶
func NewSamplerCache(textures TextureCache, size int) SamplerCache
type SamplerHandle ¶
type ShaderCache ¶
func NewShaderCache ¶
func NewShaderCache(dev *device.Device) ShaderCache
type T ¶
type T[K Key, V Value] interface { // TryFetch returns a value if it exists and is ready to use. // Resets the age of the cache line // Returns a bool indicating whether the value exists. TryFetch(K) (V, bool) // Fetch returns a value, waiting until its becomes available if it does not yet exist // Resets the age of the cache line Fetch(K) V // MaxAge returns the number of ticks until unused lines are evicted MaxAge() int // Tick increments the age of all cache lines, and evicts those // that have not been accessed in maxAge ticks or more. Tick() // Destroy the cache and all data held in it. Destroy() }
type TextureCache ¶
func NewTextureCache ¶
func NewTextureCache(device *device.Device, worker command.Worker) TextureCache
Click to show internal directories.
Click to hide internal directories.