More MacOS X fixes

This commit is contained in:
ehofman 2005-02-12 12:44:46 +00:00
parent db633330fe
commit ee8763f60d
3 changed files with 16 additions and 7 deletions

View File

@ -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

View File

@ -45,6 +45,7 @@
* Changelog:
*
* Jan. 2005, Removed GLEW dependencies, Erik Hofman
* Added MacOS X support
*/
#include <simgear/compiler.h>
@ -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 <string>
#include <vector>

View File

@ -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;