mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +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:
+1
-1
@@ -171,7 +171,7 @@ func (b *Backend) DefaultFramebuffer() gpu.Framebuffer {
|
||||
return b.defFBO
|
||||
}
|
||||
|
||||
func (b *Backend) NewTexture(format gpu.TextureFormat, width, height int, minFilter, magFilter gpu.TextureFilter) gpu.Texture {
|
||||
func (b *Backend) NewTexture(format gpu.TextureFormat, width, height int, minFilter, magFilter gpu.TextureFilter, binding gpu.BufferBinding) gpu.Texture {
|
||||
tex := &gpuTexture{backend: b, obj: b.funcs.CreateTexture()}
|
||||
switch format {
|
||||
case gpu.TextureFormatFloat:
|
||||
|
||||
Reference in New Issue
Block a user