mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 23:55:39 +00:00
gpu: add binding flags to Backend.NewTexture
Direct3D needs to know the texture bind usage up front, in particular whether the texture is going to be used as a render target. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-1
@@ -18,7 +18,7 @@ type Backend interface {
|
||||
// IsContinuousTime reports whether all timer measurements
|
||||
// are valid at the point of call.
|
||||
IsTimeContinuous() bool
|
||||
NewTexture(format TextureFormat, width, height int, minFilter, magFilter TextureFilter) Texture
|
||||
NewTexture(format TextureFormat, width, height int, minFilter, magFilter TextureFilter, bindings BufferBinding) Texture
|
||||
DefaultFramebuffer() Framebuffer
|
||||
NewFramebuffer() Framebuffer
|
||||
NewImmutableBuffer(typ BufferBinding, data []byte) Buffer
|
||||
@@ -162,6 +162,8 @@ const (
|
||||
BufferBindingIndices BufferBinding = 1 << iota
|
||||
BufferBindingVertices
|
||||
BufferBindingUniforms
|
||||
BufferBindingTexture
|
||||
BufferBindingFramebuffer
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user