GL3: Remove GL_MAX_TEXTURE_UNITS_ARB

--HG--
branch : opengl3
hg/feature/opengl3
kaetemi 11 years ago
parent 9c1165dcf9
commit 5ad62b942a

@ -1340,7 +1340,7 @@ private:
// @}
/// Same as getNbTextureStages(), but faster because inline, and not virtual!!
uint inlGetNumTextStages() const { return _Extensions.NbTextureStages; }
uint inlGetNumTextStages() const { return _Extensions.NbFragmentTextureUnits; }
NLMISC::CRGBA _CurrentBlendConstantColor;

@ -835,17 +835,14 @@ void registerGlExtensions(CGlExtensions &ext)
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &ext.EXTTextureFilterAnisotropicMaximum);
}
GLint nbFragmentTextureUnits;
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &nbFragmentTextureUnits);
ext.NbFragmentTextureUnits = (nbFragmentTextureUnits > IDRV_MAT_MAXTEXTURES) ? IDRV_MAT_MAXTEXTURES : nbFragmentTextureUnits; // FIXME GL3
// ---
// Check ARBMultiTexture
ext.ARBMultiTexture= setupARBMultiTexture(glext);
if (ext.ARBMultiTexture)
{
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &ntext);
// We could have more than IDRV_MAT_MAXTEXTURES but the interface only
// support IDRV_MAT_MAXTEXTURES texture stages so take min
ext.NbTextureStages= (ntext<((GLint)IDRV_MAT_MAXTEXTURES)?ntext:IDRV_MAT_MAXTEXTURES);
}
// Check ARBMultisample
ext.ARBMultisample = setupARBMultisample(glext);

@ -38,6 +38,7 @@ struct CGlExtensions
// Required extensions
bool GLCore;
bool ARBSeparateShaderObjects;
uint NbFragmentTextureUnits;
// Optional extensions
bool EXTTextureCompressionS3TC;
@ -46,7 +47,7 @@ struct CGlExtensions
// Required Extensions. (old)
bool ARBMultiTexture;
uint NbTextureStages;
// uint NbTextureStages;
// Optional Extensions. (old)
bool EXTSecondaryColor;
@ -67,20 +68,26 @@ public:
CGlExtensions()
{
// Fill all false by default.
GLCore = false;
ARBSeparateShaderObjects = false;
NbFragmentTextureUnits = 0;
EXTTextureCompressionS3TC = false;
EXTTextureFilterAnisotropic = false;
EXTTextureFilterAnisotropicMaximum = 0.f;
ARBMultiTexture= false;
NbTextureStages= 1;
EXTTextureCompressionS3TC= false;
EXTSecondaryColor= false;
WGLARBPBuffer= false;
WGLARBPixelFormat= false;
WGLEXTSwapControl= false;
GLXEXTSwapControl= false;
GLXSGISwapControl= false;
GLXMESASwapControl= false;
EXTBlendColor= false;
EXTTextureFilterAnisotropic = false;
EXTTextureFilterAnisotropicMaximum = 0.f;
ARBMultisample = false;
WGLARBPBuffer = false;
WGLARBPixelFormat = false;
WGLEXTSwapControl = false;
GLXEXTSwapControl = false;
GLXSGISwapControl = false;
GLXMESASwapControl = false;
}
std::string toString()
@ -89,12 +96,16 @@ public:
result += GLVersion;
result += "; Available extensions:";
result += "\n Required: ";
result += GLCore ? "GLCore " : "";
result += ARBSeparateShaderObjects ? "ARBSeparateShaderObjects " : "";
result += "\n Texturing: ";
result += ARBMultiTexture ? "ARBMultiTexture " : "";
result += EXTTextureCompressionS3TC ? "EXTTextureCompressionS3TC " : "";
result += EXTTextureFilterAnisotropic ? "EXTTextureFilterAnisotropic (Maximum = " + NLMISC::toString(EXTTextureFilterAnisotropicMaximum) + ") " : "";
result += "texture stages(*) = ";
result += NLMISC::toString(NbTextureStages);
result += NLMISC::toString(NbFragmentTextureUnits);
result += "\n Misc: ";
result += EXTSecondaryColor ? "EXTSecondaryColor " : "";

Loading…
Cancel
Save