From ee8763f60dc9f4f317fb0986e72ecce28c97d829 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sat, 12 Feb 2005 12:44:46 +0000 Subject: [PATCH] More MacOS X fixes --- simgear/screen/RenderTexture.cpp | 12 ++++++------ simgear/screen/RenderTexture.h | 9 +++++++++ simgear/screen/colors.hxx | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/simgear/screen/RenderTexture.cpp b/simgear/screen/RenderTexture.cpp index d31a61e6..2214228a 100644 --- a/simgear/screen/RenderTexture.cpp +++ b/simgear/screen/RenderTexture.cpp @@ -579,13 +579,13 @@ bool RenderTexture::_Invalidate() _iNumStencilBits = 0; if (_bIsTexture) - glDeleteTextures(1, &_iTextureID); + glDeleteTextures(1, (const GLuint*)&_iTextureID); if (_bIsDepthTexture) { // [Redge] if (!_bHasARBDepthTexture) delete[] _pPoorDepthTexture; // [/Redge] - glDeleteTextures(1, &_iDepthTextureID); + glDeleteTextures(1, (const GLuint*)&_iDepthTextureID); } #ifdef _WIN32 @@ -726,9 +726,9 @@ bool RenderTexture::Resize(int iWidth, int iHeight) // Do same basic work as _Invalidate, but don't reset all our flags if (_bIsTexture) - glDeleteTextures(1, &_iTextureID); + glDeleteTextures(1, (const GLuint*)&_iTextureID); if (_bIsDepthTexture) - glDeleteTextures(1, &_iDepthTextureID); + glDeleteTextures(1, (const GLuint*)&_iDepthTextureID); #ifdef _WIN32 if ( _hPBuffer ) { @@ -1822,7 +1822,7 @@ bool RenderTexture::_InitializeTextures() if (_bIsTexture) { - glGenTextures(1, &_iTextureID); + glGenTextures(1, (GLuint*)&_iTextureID); glBindTexture(_iTextureTarget, _iTextureID); // Use clamp to edge as the default texture wrap mode for all tex @@ -1933,7 +1933,7 @@ bool RenderTexture::_InitializeTextures() if (_bIsDepthTexture) { - glGenTextures(1, &_iDepthTextureID); + glGenTextures(1, (GLuint*)&_iDepthTextureID); glBindTexture(_iTextureTarget, _iDepthTextureID); // Use clamp to edge as the default texture wrap mode for all tex diff --git a/simgear/screen/RenderTexture.h b/simgear/screen/RenderTexture.h index 9bf4402f..3b823e2d 100644 --- a/simgear/screen/RenderTexture.h +++ b/simgear/screen/RenderTexture.h @@ -45,6 +45,7 @@ * Changelog: * * Jan. 2005, Removed GLEW dependencies, Erik Hofman + * Added MacOS X support */ #include @@ -55,6 +56,14 @@ #ifndef _WIN32 # include SG_GLX_H #endif +#ifdef __APPLE__ +# ifndef None +# define None false +# endif +# ifndef True +# define True true +# endif +#endif #include #include diff --git a/simgear/screen/colors.hxx b/simgear/screen/colors.hxx index aa0d4145..1aa0ef47 100644 --- a/simgear/screen/colors.hxx +++ b/simgear/screen/colors.hxx @@ -30,7 +30,7 @@ const float system_gamma = 1.4; #elif defined (sgi) -const float system_gamma = 1.7; +const float system_gamma = 2.0/1.7; #else // others const float system_gamma = 2.5;