DXGL r111 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r110‎ | r111 | r112 >
Date:02:52, 4 March 2012
Author:admin
Status:new
Tags:
Comment:
Fix EXT_framebuffer_object compatibility
Modified paths:
  • /ddraw/glExtensions.cpp (modified) (history)
  • /ddraw/glutil.cpp (modified) (history)

Diff [purge]

Index: ddraw/glExtensions.cpp
@@ -166,7 +166,7 @@
167167 glBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC)wglGetProcAddress("glBindFramebufferEXT");
168168 glGenRenderbuffersEXT = (PFNGLGENRENDERBUFFERSEXTPROC)wglGetProcAddress("glGenRenderbuffersEXT");
169169 glBindRenderbufferEXT = (PFNGLBINDRENDERBUFFEREXTPROC)wglGetProcAddress("glBindRenderbufferEXT");
170 - glFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)wglGetProcAddress("glFramebufferTexture2D");
 170+ glFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)wglGetProcAddress("glFramebufferTexture2DEXT");
171171 glCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)wglGetProcAddress("glCheckFramebufferStatusEXT");
172172 glDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC)wglGetProcAddress("glDeleteFramebuffersEXT");
173173 }
Index: ddraw/glutil.cpp
@@ -34,17 +34,22 @@
3535 else if(GLEXT_EXT_framebuffer_object)
3636 {
3737 glGenFramebuffersEXT(1,&fbo);
38 - glBindFramebufferEXT(GL_FRAMEBUFFER,0);
 38+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT,0);
3939 }
4040 }
4141
4242 void DeleteFBO()
4343 {
44 - glBindFramebuffer(GL_FRAMEBUFFER,0);
4544 if(GLEXT_ARB_framebuffer_object)
 45+ {
 46+ glBindFramebuffer(GL_FRAMEBUFFER,0);
4647 glDeleteFramebuffers(1,&fbo);
 48+ }
4749 else if(GLEXT_EXT_framebuffer_object)
 50+ {
 51+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT,0);
4852 glDeleteFramebuffersEXT(1,&fbo);
 53+ }
4954 }
5055
5156 GLenum SetFBO(GLint color, GLint z, bool stencil)