From df07b3bf991856f4fc0c9e069bc5f01ee26ed639 Mon Sep 17 00:00:00 2001 From: numzero Date: Sat, 15 Apr 2023 20:11:11 +0300 Subject: [PATCH] OpenGL3: Remove stencil buffer presence test --- source/Irrlicht/OpenGL3/Driver.cpp | 4 ---- source/Irrlicht/OpenGLES2/Driver.cpp | 6 ------ 2 files changed, 10 deletions(-) diff --git a/source/Irrlicht/OpenGL3/Driver.cpp b/source/Irrlicht/OpenGL3/Driver.cpp index 228cae9a..0926e744 100644 --- a/source/Irrlicht/OpenGL3/Driver.cpp +++ b/source/Irrlicht/OpenGL3/Driver.cpp @@ -49,10 +49,6 @@ namespace video { glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, DimAliasedLine); DimAliasedPoint[0] = 1.0f; DimAliasedPoint[1] = 1.0f; - - GLint val = 0; - glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_STENCIL, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &val); - StencilBuffer = val == GL_FRAMEBUFFER_DEFAULT; } IVideoDriver* createOpenGL3Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager) diff --git a/source/Irrlicht/OpenGLES2/Driver.cpp b/source/Irrlicht/OpenGLES2/Driver.cpp index 085b4459..4293d956 100644 --- a/source/Irrlicht/OpenGLES2/Driver.cpp +++ b/source/Irrlicht/OpenGLES2/Driver.cpp @@ -48,12 +48,6 @@ namespace video { 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); - - if (Version.Major >= 3 || FeatureAvailable[IRR_GL_ARB_framebuffer_object]) { - GLint val = 0; - glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_STENCIL, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &val); - StencilBuffer = val == GL_FRAMEBUFFER_DEFAULT; - } } IVideoDriver* createOGLES2Driver(const SIrrlichtCreationParameters& params, io::IFileSystem* io, IContextManager* contextManager)