]> git.mxchange.org Git - simgear.git/blobdiff - simgear/screen/extensions.hxx
Merge branch 'zan/cubemap'
[simgear.git] / simgear / screen / extensions.hxx
index 96439ad04f7e5966bf9621b342b847eae188a3d9..d7999bc62cc0d1d0627dd47e8811b467e2405071 100644 (file)
 #ifndef __SG_EXTENSIONS_HXX
 #define __SG_EXTENSIONS_HXX 1
 
-#if defined(__CYGWIN__) && !defined(WIN32) /* && !defined(USING_X) */
-#define WIN32
-#endif
-
-#if defined(WIN32)  /* MINGW and MSC predefine WIN32 */
+#ifdef WIN32
 # include <windows.h>
 #endif
 
-#if !defined(WIN32)
-# include <dlfcn.h>
-#endif
-
 #include <simgear/compiler.h>
 
-#include SG_GL_H
+#include <osg/GL>
 
+#if !defined(__APPLE__) && !defined(WIN32)
+#  include <GL/glx.h>
+#endif
 
 #if defined(__cplusplus)
 extern "C" {
@@ -50,7 +45,7 @@ extern "C" {
 #endif
 
 bool SGSearchExtensionsString(const char *extString, const char *extName);
-bool SGIsOpenGLExtensionSupported(char *extName);
+bool SGIsOpenGLExtensionSupported(const char *extName);
 
 #ifdef __APPLE__
   // don't use an inline function for symbol lookup, since it is too big
@@ -70,8 +65,7 @@ inline void (*SGLookupFunction(const char *func))()
 #elif defined( __APPLE__ )
     return (void (*)()) macosxGetGLProcAddress(func);
 
-#else // UNIX
-
+#else // UNIX, default
     return (void (*)()) SGGetGLProcAddress(func);
 #endif
 }
@@ -465,6 +459,18 @@ typedef void (*glXQueryDrawableProc) (Display *, GLXDrawable, int, unsigned int
 #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV                       0x84F8
 #endif
 
+/*
+ * NV_texture_rectangle
+ */
+
+#ifndef GL_EXT_texture_rectangle
+#define GL_EXT_texture_rectangle 1
+#define GL_TEXTURE_RECTANGLE_EXT                               0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_EXT                       0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_EXT                         0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT                      0x84F8
+#endif
+
 /*
  * WGL_NV_texture_rectangle
  */
@@ -586,6 +592,7 @@ typedef void (*glXQueryDrawableProc) (Display *, GLXDrawable, int, unsigned int
 
 #ifndef GL_VERSION_2_0
 #define GL_POINT_SPRITE                   0x8861
+#define GL_COORD_REPLACE                  0x8862
 #endif
 
 /*