gpu: specify target Texture Backend.NewFramebuffer

OpenGL doesn't care if the texture to a framebuffer changes, but
Direct3D does. Change Backend to better match both APIs.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-21 15:02:54 +01:00
parent cae97a9861
commit eb7e11ee8e
3 changed files with 11 additions and 15 deletions
+1 -2
View File
@@ -20,7 +20,7 @@ type Backend interface {
IsTimeContinuous() bool
NewTexture(format TextureFormat, width, height int, minFilter, magFilter TextureFilter, bindings BufferBinding) Texture
DefaultFramebuffer() Framebuffer
NewFramebuffer() Framebuffer
NewFramebuffer(tex Texture) Framebuffer
NewImmutableBuffer(typ BufferBinding, data []byte) Buffer
NewBuffer(typ BufferBinding, size int) Buffer
NewProgram(vertexShader, fragmentShader ShaderSources) (Program, error)
@@ -125,7 +125,6 @@ type Buffer interface {
type Framebuffer interface {
Bind()
BindTexture(t Texture)
Invalidate()
Release()
IsComplete() error