mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicsdriver/opengl: fix the error message when GenFramebufferEXT fails
This commit is contained in:
parent
6b416d2340
commit
f888b7868b
@ -234,9 +234,8 @@ func (c *context) deleteRenderbuffer(r renderbufferNative) {
|
||||
func (c *context) newFramebuffer(texture textureNative) (framebufferNative, error) {
|
||||
var f uint32
|
||||
gl.GenFramebuffersEXT(1, &f)
|
||||
// TODO: Use gl.IsFramebuffer
|
||||
if f <= 0 {
|
||||
return 0, errors.New("opengl: creating framebuffer failed: gl.IsFramebuffer returns false")
|
||||
return 0, errors.New("opengl: creating framebuffer failed")
|
||||
}
|
||||
c.bindFramebuffer(framebufferNative(f))
|
||||
gl.FramebufferTexture2DEXT(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, uint32(texture), 0)
|
||||
|
Loading…
Reference in New Issue
Block a user