mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +00:00
gpu,gpu/internal,internal/gl: replace BlitFramebuffer with CopyTexture
OpenGL ES 2.0 doesn't support glBlitFramebuffer, but does support glCopyTexSubImage2D. Fortunately, we don't need the extra features of glBlitFramebuffer anyway. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -104,9 +104,6 @@ func (f *Functions) BlendEquation(mode Enum) {
|
||||
func (f *Functions) BlendFuncSeparate(srcRGB, dstRGB, srcA, dstA Enum) {
|
||||
f.Ctx.Call("blendFunc", int(srcRGB), int(dstRGB), int(srcA), int(dstA))
|
||||
}
|
||||
func (f *Functions) BlitFramebuffer(sx0, sy0, sx1, sy1, dx0, dy0, dx1, dy1 int, mask Enum, filter Enum) {
|
||||
panic("not implemented")
|
||||
}
|
||||
func (f *Functions) BufferData(target Enum, size int, usage Enum) {
|
||||
f.Ctx.Call("bufferData", int(target), size, int(usage))
|
||||
}
|
||||
@@ -128,6 +125,9 @@ func (f *Functions) ClearDepthf(d float32) {
|
||||
func (f *Functions) CompileShader(s Shader) {
|
||||
f.Ctx.Call("compileShader", js.Value(s))
|
||||
}
|
||||
func (f *Functions) CopyTexSubImage2D(target Enum, level, xoffset, yoffset, x, y, width, height int) {
|
||||
f.Ctx.Call("copyTexSubImage2D", int(target), level, xoffset, yoffset, x, y, width, height)
|
||||
}
|
||||
func (f *Functions) CreateBuffer() Buffer {
|
||||
return Buffer(f.Ctx.Call("createBuffer"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user