Skip to content

Commit

Permalink
Use GL_READ/DRAW_FRAMEBUFFER on desktop GL.
Browse files Browse the repository at this point in the history
Even for < OpenGL 4.3 (GLES3 = false.)
  • Loading branch information
unknownbrackets committed Jan 4, 2014
1 parent 73f612a commit ed8df10
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gfx_es2/fbo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,11 @@ void fbo_unbind() {

void fbo_bind_as_render_target(FBO *fbo) {
if (gl_extensions.FBO_ARB) {
#ifndef USING_GLES2
if (true) {
#else
if (gl_extensions.GLES3) {
#endif
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo->handle);
} else {
// This will collide with bind_for_read - but there's nothing in ES 2.0
Expand All @@ -269,7 +273,11 @@ void fbo_bind_as_render_target(FBO *fbo) {

void fbo_bind_for_read(FBO *fbo) {
if (gl_extensions.FBO_ARB) {
#ifndef USING_GLES2
if (true) {
#else
if (gl_extensions.GLES3) {
#endif
glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo->handle);
} else {
// This will collide with bind_as_render_target - but there's nothing in ES 2.0
Expand Down

0 comments on commit ed8df10

Please sign in to comment.