ogles 2 driver: Delete some dead code

grepping for IRR_COMPILE_GLES2_COMMON gives no other results

COGLESCoreExtensionHandler is only used through COpenGL3ExtensionHandler
This commit is contained in:
grorp 2024-11-07 20:12:37 +01:00 committed by grorp
parent fced6ff240
commit 50b7523336
2 changed files with 2 additions and 91 deletions

@ -24,39 +24,21 @@ public:
enum EOGLESFeatures enum EOGLESFeatures
{ {
// If you update this enum also update the corresponding OGLESFeatureStrings string-array // If you update this enum also update the corresponding OGLESFeatureStrings string-array
IRR_GL_APPLE_texture_2D_limited_npot,
IRR_GL_APPLE_texture_format_BGRA8888, IRR_GL_APPLE_texture_format_BGRA8888,
IRR_GL_EXT_blend_minmax, IRR_GL_EXT_blend_minmax,
IRR_GL_EXT_read_format_bgra,
IRR_GL_EXT_texture_filter_anisotropic,
IRR_GL_EXT_texture_format_BGRA8888, IRR_GL_EXT_texture_format_BGRA8888,
IRR_GL_EXT_texture_lod_bias,
IRR_GL_EXT_texture_rg, IRR_GL_EXT_texture_rg,
IRR_GL_IMG_read_format,
IRR_GL_IMG_texture_format_BGRA8888,
IRR_GL_IMG_user_clip_plane,
IRR_GL_OES_blend_func_separate,
IRR_GL_OES_blend_subtract,
IRR_GL_OES_depth_texture, IRR_GL_OES_depth_texture,
IRR_GL_OES_depth24,
IRR_GL_OES_depth32,
IRR_GL_OES_element_index_uint, IRR_GL_OES_element_index_uint,
IRR_GL_OES_framebuffer_object,
IRR_GL_OES_packed_depth_stencil, IRR_GL_OES_packed_depth_stencil,
IRR_GL_OES_point_size_array,
IRR_GL_OES_point_sprite,
IRR_GL_OES_read_format,
IRR_GL_OES_stencil_wrap,
IRR_GL_OES_texture_float, IRR_GL_OES_texture_float,
IRR_GL_OES_texture_half_float, IRR_GL_OES_texture_half_float,
IRR_GL_OES_texture_mirrored_repeat,
IRR_GL_OES_texture_npot,
IRR_OGLES_Feature_Count IRR_OGLES_Feature_Count
}; };
COGLESCoreExtensionHandler() : COGLESCoreExtensionHandler() :
Version(0), MaxAnisotropy(1), MaxIndices(0xffff), MaxAnisotropy(1), MaxIndices(0xffff),
MaxTextureSize(1), MaxTextureLODBias(0.f), StencilBuffer(false) MaxTextureSize(1), MaxTextureLODBias(0.f), StencilBuffer(false)
{ {
for (u32 i = 0; i < IRR_OGLES_Feature_Count; ++i) for (u32 i = 0; i < IRR_OGLES_Feature_Count; ++i)
@ -81,99 +63,27 @@ public:
os::Printer::log(getFeatureString(i), FeatureAvailable[i] ? " true" : " false"); os::Printer::log(getFeatureString(i), FeatureAvailable[i] ? " true" : " false");
} }
bool queryGLESFeature(EOGLESFeatures feature) const
{
return FeatureAvailable[feature];
}
protected: protected:
const char *getFeatureString(size_t index) const const char *getFeatureString(size_t index) const
{ {
// One for each EOGLESFeatures // One for each EOGLESFeatures
static const char *const OGLESFeatureStrings[IRR_OGLES_Feature_Count] = { static const char *const OGLESFeatureStrings[IRR_OGLES_Feature_Count] = {
"GL_APPLE_texture_2D_limited_npot",
"GL_APPLE_texture_format_BGRA8888", "GL_APPLE_texture_format_BGRA8888",
"GL_EXT_blend_minmax", "GL_EXT_blend_minmax",
"GL_EXT_read_format_bgra",
"GL_EXT_texture_filter_anisotropic",
"GL_EXT_texture_format_BGRA8888", "GL_EXT_texture_format_BGRA8888",
"GL_EXT_texture_lod_bias",
"GL_EXT_texture_rg", "GL_EXT_texture_rg",
"GL_IMG_read_format",
"GL_IMG_texture_format_BGRA8888",
"GL_IMG_user_clip_plane",
"GL_OES_blend_func_separate",
"GL_OES_blend_subtract",
"GL_OES_depth_texture", "GL_OES_depth_texture",
"GL_OES_depth24",
"GL_OES_depth32",
"GL_OES_element_index_uint", "GL_OES_element_index_uint",
"GL_OES_framebuffer_object",
"GL_OES_packed_depth_stencil", "GL_OES_packed_depth_stencil",
"GL_OES_point_size_array",
"GL_OES_point_sprite",
"GL_OES_read_format",
"GL_OES_stencil_wrap",
"GL_OES_texture_float", "GL_OES_texture_float",
"GL_OES_texture_half_float", "GL_OES_texture_half_float",
"GL_OES_texture_mirrored_repeat",
"GL_OES_texture_npot",
}; };
return OGLESFeatureStrings[index]; return OGLESFeatureStrings[index];
} }
void getGLVersion()
{
Version = 0;
s32 multiplier = 100;
core::stringc version(glGetString(GL_VERSION));
for (u32 i = 0; i < version.size(); ++i) {
if (version[i] >= '0' && version[i] <= '9') {
if (multiplier > 1) {
Version += static_cast<u16>(core::floor32(atof(&(version[i]))) * multiplier);
multiplier /= 10;
} else {
break;
}
}
}
}
void getGLExtensions()
{
core::stringc extensions = glGetString(GL_EXTENSIONS);
os::Printer::log(extensions.c_str());
const u32 size = extensions.size() + 1;
c8 *str = new c8[size];
strncpy(str, extensions.c_str(), extensions.size());
str[extensions.size()] = ' ';
c8 *p = str;
for (u32 i = 0; i < size; ++i) {
if (str[i] == ' ') {
str[i] = 0;
if (*p)
for (size_t j = 0; j < IRR_OGLES_Feature_Count; ++j) {
if (!strcmp(getFeatureString(j), p)) {
FeatureAvailable[j] = true;
break;
}
}
p = p + strlen(p) + 1;
}
}
delete[] str;
}
COpenGLCoreFeature Feature; COpenGLCoreFeature Feature;
u16 Version;
u8 MaxAnisotropy; u8 MaxAnisotropy;
u32 MaxIndices; u32 MaxIndices;
u32 MaxTextureSize; u32 MaxTextureSize;

@ -297,6 +297,7 @@ public:
delete[] tmpBuffer; delete[] tmpBuffer;
} }
#elif defined(IRR_COMPILE_GLES2_COMMON) #elif defined(IRR_COMPILE_GLES2_COMMON)
// TODO: revive this code
COpenGLCoreTexture *tmpTexture = new COpenGLCoreTexture("OGL_CORE_LOCK_TEXTURE", Size, ETT_2D, ColorFormat, Driver); COpenGLCoreTexture *tmpTexture = new COpenGLCoreTexture("OGL_CORE_LOCK_TEXTURE", Size, ETT_2D, ColorFormat, Driver);
GLuint tmpFBO = 0; GLuint tmpFBO = 0;