From: ehofman Date: Mon, 31 Jan 2005 18:07:40 +0000 (+0000) Subject: Cygwin fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9ab77d65f4e26b3bb0129c647f021a41b52f41ac;p=simgear.git Cygwin fixes --- diff --git a/simgear/screen/RenderTexture.cpp b/simgear/screen/RenderTexture.cpp index 96aeeaa3..666b8445 100644 --- a/simgear/screen/RenderTexture.cpp +++ b/simgear/screen/RenderTexture.cpp @@ -254,7 +254,7 @@ void PrintExtensionError( char* strMsg, ... ) char strBuffer[512]; va_list args; va_start(args, strMsg); -#ifdef _WIN32 +#if defined _WIN32 && !defined __CYGWIN__ _vsnprintf( strBuffer, 512, strMsg, args ); #else vsnprintf( strBuffer, 512, strMsg, args ); @@ -264,6 +264,7 @@ void PrintExtensionError( char* strMsg, ... ) fprintf(stderr, strMsg); } + //--------------------------------------------------------------------------- // Function : RenderTexture::Initialize // Description : @@ -294,7 +295,7 @@ bool RenderTexture::Initialize(int width, int height, if (_bInitialized) _Invalidate(); -#if _WIN32 +#ifdef _WIN32 // Get the current context. HDC hdc = wglGetCurrentDC(); if (NULL == hdc) @@ -582,7 +583,7 @@ bool RenderTexture::_Invalidate() glDeleteTextures(1, &_iDepthTextureID); } -#if _WIN32 +#ifdef _WIN32 if ( _hPBuffer ) { // Check if we are currently rendering in the pbuffer @@ -675,7 +676,7 @@ bool RenderTexture::Reset(const char *strMode, ...) va_list args; char strBuffer[256]; va_start(args,strMode); -#ifdef _WIN32 +#if defined _WIN32 && !defined __CYGWIN__ _vsnprintf( strBuffer, 256, strMode, args ); #else vsnprintf( strBuffer, 256, strMode, args ); @@ -953,7 +954,7 @@ bool RenderTexture::BindBuffer( int iBuffer ) { glBindTexture(_iTextureTarget, _iTextureID); -#if _WIN32 +#ifdef _WIN32 if (RT_RENDER_TO_TEXTURE == _eUpdateMode && _bIsTexture && (!_bIsBufferBound || _iCurrentBoundBuffer != iBuffer)) {