Forums

Full Version: r2926 won't build
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just downloaded r2926 and tried to build it on my Fedora box, but I got a couple of errors re: undefined constants. I managed to fix them (only 3 places) by replacing
Code:
GL_TEXTURE_RECTANGLE
with
Code:
GL_TEXTURE_RECTANGLE_EXT
and
Code:
GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS
with
Code:
GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT
.

Here is a patch if you want it (not sure if this is the correct way of doing things - let me know if there is a better way):
Code:
diff --git a/include/fbtexture.h b/include/fbtexture.h
index 15a21fe..4bb0fbd 100644
--- a/include/fbtexture.h
+++ b/include/fbtexture.h
@@ -23,7 +23,7 @@ class FBTEXTURE : public TEXTURE_INTERFACE
                enum TARGET
                {
                        NORMAL = GL_TEXTURE_2D,
-                       RECTANGLE = GL_TEXTURE_RECTANGLE,
+                       RECTANGLE = GL_TEXTURE_RECTANGLE_EXT,
                        CUBEMAP = GL_TEXTURE_CUBE_MAP
                };
                
diff --git a/src/fbobject.cpp b/src/fbobject.cpp
index ad3cbd6..5302c9b 100644
--- a/src/fbobject.cpp
+++ b/src/fbobject.cpp
@@ -326,7 +326,7 @@ std::string GetStatusString(GLenum status)
                case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:
                return "incomplete multisample";
                
-               case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS:
+               case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT:
                return "incomplete layer targets";
        }
        
diff --git a/src/fbtexture.cpp b/src/fbtexture.cpp
index e536de3..905377a 100644
--- a/src/fbtexture.cpp
+++ b/src/fbtexture.cpp
@@ -38,7 +38,7 @@ void FBTEXTURE::Init(GLSTATEMANAGER & glstate, int sizex, int sizey, TARGET targ
                multisample = 0;
        
        //set texture info
-       if (texture_target == GL_TEXTURE_RECTANGLE)
+       if (texture_target == GL_TEXTURE_RECTANGLE_EXT)
        {
                assert(GLEW_ARB_texture_rectangle);
        }
[/code]
GLEW >= 1.5.3 ?
Sorry, no. my GLEW is stuck on 1.5.1, and no update has been offered yet. I will have to wait till I get Fedora 14 on my box before I receive this update then, which will hopefully fix this problem.