Cygwin fixes
This commit is contained in:
@@ -254,7 +254,7 @@ void PrintExtensionError( char* strMsg, ... )
|
|||||||
char strBuffer[512];
|
char strBuffer[512];
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, strMsg);
|
va_start(args, strMsg);
|
||||||
#ifdef _WIN32
|
#if defined _WIN32 && !defined __CYGWIN__
|
||||||
_vsnprintf( strBuffer, 512, strMsg, args );
|
_vsnprintf( strBuffer, 512, strMsg, args );
|
||||||
#else
|
#else
|
||||||
vsnprintf( strBuffer, 512, strMsg, args );
|
vsnprintf( strBuffer, 512, strMsg, args );
|
||||||
@@ -264,6 +264,7 @@ void PrintExtensionError( char* strMsg, ... )
|
|||||||
fprintf(stderr, strMsg);
|
fprintf(stderr, strMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Function : RenderTexture::Initialize
|
// Function : RenderTexture::Initialize
|
||||||
// Description :
|
// Description :
|
||||||
@@ -294,7 +295,7 @@ bool RenderTexture::Initialize(int width, int height,
|
|||||||
if (_bInitialized)
|
if (_bInitialized)
|
||||||
_Invalidate();
|
_Invalidate();
|
||||||
|
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
// Get the current context.
|
// Get the current context.
|
||||||
HDC hdc = wglGetCurrentDC();
|
HDC hdc = wglGetCurrentDC();
|
||||||
if (NULL == hdc)
|
if (NULL == hdc)
|
||||||
@@ -582,7 +583,7 @@ bool RenderTexture::_Invalidate()
|
|||||||
glDeleteTextures(1, &_iDepthTextureID);
|
glDeleteTextures(1, &_iDepthTextureID);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
if ( _hPBuffer )
|
if ( _hPBuffer )
|
||||||
{
|
{
|
||||||
// Check if we are currently rendering in the pbuffer
|
// Check if we are currently rendering in the pbuffer
|
||||||
@@ -675,7 +676,7 @@ bool RenderTexture::Reset(const char *strMode, ...)
|
|||||||
va_list args;
|
va_list args;
|
||||||
char strBuffer[256];
|
char strBuffer[256];
|
||||||
va_start(args,strMode);
|
va_start(args,strMode);
|
||||||
#ifdef _WIN32
|
#if defined _WIN32 && !defined __CYGWIN__
|
||||||
_vsnprintf( strBuffer, 256, strMode, args );
|
_vsnprintf( strBuffer, 256, strMode, args );
|
||||||
#else
|
#else
|
||||||
vsnprintf( strBuffer, 256, strMode, args );
|
vsnprintf( strBuffer, 256, strMode, args );
|
||||||
@@ -953,7 +954,7 @@ bool RenderTexture::BindBuffer( int iBuffer )
|
|||||||
{
|
{
|
||||||
glBindTexture(_iTextureTarget, _iTextureID);
|
glBindTexture(_iTextureTarget, _iTextureID);
|
||||||
|
|
||||||
#if _WIN32
|
#ifdef _WIN32
|
||||||
if (RT_RENDER_TO_TEXTURE == _eUpdateMode && _bIsTexture &&
|
if (RT_RENDER_TO_TEXTURE == _eUpdateMode && _bIsTexture &&
|
||||||
(!_bIsBufferBound || _iCurrentBoundBuffer != iBuffer))
|
(!_bIsBufferBound || _iCurrentBoundBuffer != iBuffer))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user