mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-28 06:20:21 +02:00
OpenGL3: New extension listing system
This commit is contained in:
@ -30,23 +30,27 @@ namespace video {
|
||||
else
|
||||
initExtensionsOld();
|
||||
|
||||
const bool MRTSupported = Version.Major >= 3 || queryExtension("GL_EXT_draw_buffers");
|
||||
AnisotropicFilterSupported = queryExtension("GL_EXT_texture_filter_anisotropic");
|
||||
const bool TextureLODBiasSupported = queryExtension("GL_EXT_texture_lod_bias");
|
||||
|
||||
// COGLESCoreExtensionHandler::Feature
|
||||
static_assert(MATERIAL_MAX_TEXTURES <= 8, "Only up to 8 textures are guaranteed");
|
||||
Feature.BlendOperation = true;
|
||||
Feature.ColorAttachment = 1;
|
||||
if (Version.Major >= 3 || FeatureAvailable[IRR_GL_EXT_draw_buffers])
|
||||
if (MRTSupported)
|
||||
Feature.ColorAttachment = GetInteger(GL_MAX_COLOR_ATTACHMENTS);
|
||||
Feature.MaxTextureUnits = MATERIAL_MAX_TEXTURES;
|
||||
if (Version.Major >= 3 || FeatureAvailable[IRR_GL_EXT_draw_buffers])
|
||||
if (MRTSupported)
|
||||
Feature.MultipleRenderTarget = GetInteger(GL_MAX_DRAW_BUFFERS);
|
||||
|
||||
// COGLESCoreExtensionHandler
|
||||
if (FeatureAvailable[IRR_GL_EXT_texture_filter_anisotropic])
|
||||
if (AnisotropicFilterSupported)
|
||||
MaxAnisotropy = GetInteger(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT);
|
||||
if (Version.Major >= 3 || FeatureAvailable[IRR_GL_EXT_draw_range_elements])
|
||||
if (Version.Major >= 3 || queryExtension("GL_EXT_draw_range_elements"))
|
||||
MaxIndices = GetInteger(GL_MAX_ELEMENTS_INDICES);
|
||||
MaxTextureSize = GetInteger(GL_MAX_TEXTURE_SIZE);
|
||||
if (FeatureAvailable[IRR_GL_EXT_texture_lod_bias])
|
||||
if (TextureLODBiasSupported)
|
||||
glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS, &MaxTextureLODBias);
|
||||
glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, DimAliasedLine); // NOTE: this is not in the OpenGL ES 2.0 spec...
|
||||
glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, DimAliasedPoint);
|
||||
|
Reference in New Issue
Block a user