]> git.mxchange.org Git - simgear.git/blobdiff - simgear/screen/RenderTexture.h
Merge branches 'ehofman/config' and 'ehofman/dlerror'
[simgear.git] / simgear / screen / RenderTexture.h
index 9bf4402f046dc8a069a32b33e4228ae19093b52d..a1874fbc8aac90ffe37311e1e24eef7485f6b9e4 100644 (file)
@@ -27,6 +27,7 @@
 // Original RenderTexture code: Mark J. Harris
 // Original Render-to-depth-texture support: Thorsten Scheuermann
 // Linux Copy-to-texture: Eric Werness
+// OS X: Alexander Powell (someone please help)
 // Various Bug Fixes: Daniel (Redge) Sperl 
 //                    Bill Baxter
 //
  * Changelog:
  *
  * Jan. 2005, Removed GLEW dependencies, Erik Hofman
+ * Mar. 2006, Added MAC OS X support, Alexander Powell
  */
 #include <simgear/compiler.h>
 
+#include <osg/GL>
+
+#if defined( __APPLE__)
+#  include <OpenGL/OpenGL.h>
+#endif
+
 #if !defined( _WIN32 ) && !defined( __APPLE__ )
 #  include <X11/Xlib.h>
-#endif
-#include SG_GL_H
-#ifndef _WIN32
-#  include SG_GLX_H
+#  include <GL/glx.h>
 #endif
 
 #include <string>
@@ -337,8 +342,11 @@ protected: // data
     
     HDC          _hPreviousDC;
     HGLRC        _hPreviousContext;
-#elif defined( __APPLE__ )
-    
+#elif defined( __MACH__ )
+    CGLContextObj      _hGLContext;
+    CGLPBufferObj   _hPBuffer;
+   
+    CGLContextObj      _hPreviousContext;
 #else
     Display     *_pDisplay;
     GLXContext   _hGLContext;
@@ -350,8 +358,8 @@ protected: // data
     
     // Texture stuff
     GLenum       _iTextureTarget;
-    unsigned int _iTextureID;
-    unsigned int _iDepthTextureID;
+    GLuint       _iTextureID;
+    GLuint       _iDepthTextureID;
     
     unsigned short* _pPoorDepthTexture; // [Redge]