Переглянути джерело

Update x86UNIX's OpenGLDevice to implement the abstract class

* It looks like the platformX86UNIX OpenGLDevice was missing a required
  method. Added it back so it compiles, but with the same
  "unimplemented" message that setVerticalSync uses.
Harley Laue 9 роки тому
батько
коміт
a1a8cc588d

+ 13 - 0
engine/source/platformX86UNIX/x86UNIXOGLVideo.cc

@@ -488,6 +488,19 @@ bool OpenGLDevice::setGammaCorrection(F32 g)
    return ok != -1;
 }
 
+//------------------------------------------------------------------------------
+bool OpenGLDevice::getVerticalSync()
+{
+   Con::printf("WARNING: OpenGLDevice::getVerticalSync is unimplemented %s %d\n", __FILE__, __LINE__);
+   return false;
+#if 0
+    if ( !gGLState.suppSwapInterval )
+        return( false );
+
+    return (qwglGetSwapIntervalEXT());
+#endif
+}
+
 //------------------------------------------------------------------------------
 bool OpenGLDevice::setVerticalSync( bool on )
 {

+ 2 - 1
engine/source/platformX86UNIX/x86UNIXOGLVideo.h

@@ -42,7 +42,7 @@ class OpenGLDevice : public DisplayDevice
       OpenGLDevice();
       virtual ~OpenGLDevice();
 
-      void initDevice();
+      virtual void initDevice();
       bool activate( U32 width, U32 height, U32 bpp, bool fullScreen );
       void shutdown();
       void destroy();
@@ -51,6 +51,7 @@ class OpenGLDevice : public DisplayDevice
       const char* getDriverInfo();
       bool getGammaCorrection(F32 &g);
       bool setGammaCorrection(F32 g);
+      bool getVerticalSync();
       bool setVerticalSync( bool on );
       void loadResolutions();