Oops, wrong extension defines and wrong maximal count.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2917 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2009-11-23 19:53:35 +00:00
parent 0fd0e52e7e
commit 9b418dbd9e
2 changed files with 8 additions and 8 deletions

View File

@ -3425,7 +3425,7 @@ bool COpenGLDriver::setRenderTarget(const core::array<video::IRenderTarget>& tar
if (targets.size()==0) if (targets.size()==0)
return setRenderTarget(0, clearBackBuffer, clearZBuffer, color); return setRenderTarget(0, clearBackBuffer, clearZBuffer, color);
u32 maxMultipleRTTs = core::min_(16u, targets.size()); u32 maxMultipleRTTs = core::min_(static_cast<u32>(MaxMultipleRenderTargets), targets.size());
// determine common size // determine common size
core::dimension2du rttSize = CurrentRendertargetSize; core::dimension2du rttSize = CurrentRendertargetSize;

View File

@ -452,7 +452,7 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
#endif #endif
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &num); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &num);
MaxTextureSize=static_cast<u32>(num); MaxTextureSize=static_cast<u32>(num);
#ifdef EXT_texture_lod_bias #ifdef GL_EXT_texture_lod_bias
if (FeatureAvailable[IRR_EXT_texture_lod_bias]) if (FeatureAvailable[IRR_EXT_texture_lod_bias])
glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &MaxTextureLODBias); glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &MaxTextureLODBias);
#endif #endif
@ -460,17 +460,17 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
MaxUserClipPlanes=static_cast<u8>(num); MaxUserClipPlanes=static_cast<u8>(num);
glGetIntegerv(GL_AUX_BUFFERS, &num); glGetIntegerv(GL_AUX_BUFFERS, &num);
MaxAuxBuffers=static_cast<u8>(num); MaxAuxBuffers=static_cast<u8>(num);
#ifdef ARB_draw_buffers #ifdef GL_ARB_draw_buffers
if (FeatureAvailable[IRR_ARB_draw_buffers]) if (FeatureAvailable[IRR_ARB_draw_buffers])
{ {
glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, reinterpret_cast<GLint*>(&MaxUserClipPlanes)); glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &num);
MaxMultipleRenderTargets = static_cast<u8>(MaxUserClipPlanes); MaxMultipleRenderTargets = static_cast<u8>(num);
} }
#elif defined(ATI_draw_buffers) #elif defined(GL_ATI_draw_buffers)
if (FeatureAvailable[IRR_ATI_draw_buffers]) if (FeatureAvailable[IRR_ATI_draw_buffers])
{ {
glGetIntegerv(GL_MAX_DRAW_BUFFERS_ATI, reinterpret_cast<GLint*>(&MaxUserClipPlanes)); glGetIntegerv(GL_MAX_DRAW_BUFFERS_ATI, &num);
MaxMultipleRenderTargets = static_cast<u8>(MaxUserClipPlanes); MaxMultipleRenderTargets = static_cast<u8>(num);
} }
#endif #endif
glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, DimAliasedLine); glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, DimAliasedLine);