More MacOS X fixes
This commit is contained in:
@@ -579,13 +579,13 @@ bool RenderTexture::_Invalidate()
|
|||||||
_iNumStencilBits = 0;
|
_iNumStencilBits = 0;
|
||||||
|
|
||||||
if (_bIsTexture)
|
if (_bIsTexture)
|
||||||
glDeleteTextures(1, &_iTextureID);
|
glDeleteTextures(1, (const GLuint*)&_iTextureID);
|
||||||
if (_bIsDepthTexture)
|
if (_bIsDepthTexture)
|
||||||
{
|
{
|
||||||
// [Redge]
|
// [Redge]
|
||||||
if (!_bHasARBDepthTexture) delete[] _pPoorDepthTexture;
|
if (!_bHasARBDepthTexture) delete[] _pPoorDepthTexture;
|
||||||
// [/Redge]
|
// [/Redge]
|
||||||
glDeleteTextures(1, &_iDepthTextureID);
|
glDeleteTextures(1, (const GLuint*)&_iDepthTextureID);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#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
|
// Do same basic work as _Invalidate, but don't reset all our flags
|
||||||
if (_bIsTexture)
|
if (_bIsTexture)
|
||||||
glDeleteTextures(1, &_iTextureID);
|
glDeleteTextures(1, (const GLuint*)&_iTextureID);
|
||||||
if (_bIsDepthTexture)
|
if (_bIsDepthTexture)
|
||||||
glDeleteTextures(1, &_iDepthTextureID);
|
glDeleteTextures(1, (const GLuint*)&_iDepthTextureID);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if ( _hPBuffer )
|
if ( _hPBuffer )
|
||||||
{
|
{
|
||||||
@@ -1822,7 +1822,7 @@ bool RenderTexture::_InitializeTextures()
|
|||||||
|
|
||||||
if (_bIsTexture)
|
if (_bIsTexture)
|
||||||
{
|
{
|
||||||
glGenTextures(1, &_iTextureID);
|
glGenTextures(1, (GLuint*)&_iTextureID);
|
||||||
glBindTexture(_iTextureTarget, _iTextureID);
|
glBindTexture(_iTextureTarget, _iTextureID);
|
||||||
|
|
||||||
// Use clamp to edge as the default texture wrap mode for all tex
|
// Use clamp to edge as the default texture wrap mode for all tex
|
||||||
@@ -1933,7 +1933,7 @@ bool RenderTexture::_InitializeTextures()
|
|||||||
|
|
||||||
if (_bIsDepthTexture)
|
if (_bIsDepthTexture)
|
||||||
{
|
{
|
||||||
glGenTextures(1, &_iDepthTextureID);
|
glGenTextures(1, (GLuint*)&_iDepthTextureID);
|
||||||
glBindTexture(_iTextureTarget, _iDepthTextureID);
|
glBindTexture(_iTextureTarget, _iDepthTextureID);
|
||||||
|
|
||||||
// Use clamp to edge as the default texture wrap mode for all tex
|
// Use clamp to edge as the default texture wrap mode for all tex
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
* Changelog:
|
* Changelog:
|
||||||
*
|
*
|
||||||
* Jan. 2005, Removed GLEW dependencies, Erik Hofman
|
* Jan. 2005, Removed GLEW dependencies, Erik Hofman
|
||||||
|
* Added MacOS X support
|
||||||
*/
|
*/
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
@@ -55,6 +56,14 @@
|
|||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
# include SG_GLX_H
|
# include SG_GLX_H
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __APPLE__
|
||||||
|
# ifndef None
|
||||||
|
# define None false
|
||||||
|
# endif
|
||||||
|
# ifndef True
|
||||||
|
# define True true
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
const float system_gamma = 1.4;
|
const float system_gamma = 1.4;
|
||||||
|
|
||||||
#elif defined (sgi)
|
#elif defined (sgi)
|
||||||
const float system_gamma = 1.7;
|
const float system_gamma = 2.0/1.7;
|
||||||
|
|
||||||
#else // others
|
#else // others
|
||||||
const float system_gamma = 2.5;
|
const float system_gamma = 2.5;
|
||||||
|
|||||||
Reference in New Issue
Block a user