]> git.mxchange.org Git - simgear.git/commitdiff
Fix various compiler warnings.
authorcurt <curt>
Wed, 16 May 2007 16:07:03 +0000 (16:07 +0000)
committercurt <curt>
Wed, 16 May 2007 16:07:03 +0000 (16:07 +0000)
simgear/screen/RenderTexture.cpp

index 9e55bf54727cc56d8500832e4c29c26fa2753789..661ab69399381f7fb90a3abb829789f86c67545b 100644 (file)
@@ -146,8 +146,8 @@ RenderTexture::RenderTexture(const char *strMode)
     _pDisplay(NULL),
     _hGLContext(NULL),
     _hPBuffer(0),
-    _hPreviousContext(0),
     _hPreviousDrawable(0),
+    _hPreviousContext(0),
 #endif
     _iTextureTarget(GL_NONE),
     _iTextureID(0),
@@ -622,7 +622,7 @@ bool RenderTexture::Initialize(int width, int height,
     _pDisplay = glXGetCurrentDisplay();
     GLXContext context = glXGetCurrentContext();
     int screen = DefaultScreen(_pDisplay);
-    XVisualInfo *visInfo;
+    XVisualInfo *visInfo = NULL;
     
     GLXFBConfig *fbConfigs;
     int nConfigs;
@@ -667,9 +667,11 @@ bool RenderTexture::Initialize(int width, int height,
     }
     else
     {
+#ifdef WIN32
         int iFormat = 0;
         int iNumFormats;
         int attrib = 0;
+#endif
         for (int i=0;i<nConfigs;i++)
         {
             _hPBuffer = glXCreateGLXPbufferPtr(_pDisplay, fbConfigs[i], 
@@ -1119,7 +1121,7 @@ bool RenderTexture::EndCapture()
  */ 
 bool RenderTexture::BeginCapture(RenderTexture* current)
 {
-    bool bContextReset = false;
+    // bool bContextReset = false;
     
     if (current == this) {
         return true; // no switch necessary
@@ -2623,8 +2625,8 @@ RenderTexture::RenderTexture(int width, int height,
     _iCurrentBoundBuffer(0),
     _iNumDepthBits(0),
     _iNumStencilBits(0),
-    _bDoubleBuffered(false),
     _bFloat(false),
+    _bDoubleBuffered(false),
     _bPowerOf2(true),
     _bRectangle(false),
     _bMipmap(false),
@@ -2644,8 +2646,8 @@ RenderTexture::RenderTexture(int width, int height,
     _pDisplay(NULL),
     _hGLContext(NULL),
     _hPBuffer(0),
-    _hPreviousContext(0),
     _hPreviousDrawable(0),
+    _hPreviousContext(0),
 #endif
     _iTextureTarget(GL_NONE),
     _iTextureID(0),