From ee2467d622400ac7535672adafe9d7c8228c9997 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 16 Jan 2024 23:59:33 +0100 Subject: [PATCH] Remove some dead code --- source/Irrlicht/COpenGLExtensionHandler.cpp | 214 -------------------- source/Irrlicht/COpenGLExtensionHandler.h | 2 - 2 files changed, 216 deletions(-) diff --git a/source/Irrlicht/COpenGLExtensionHandler.cpp b/source/Irrlicht/COpenGLExtensionHandler.cpp index d1c4a46b..7c25a146 100644 --- a/source/Irrlicht/COpenGLExtensionHandler.cpp +++ b/source/Irrlicht/COpenGLExtensionHandler.cpp @@ -127,220 +127,6 @@ void COpenGLExtensionHandler::dump(ELOG_LEVEL logLevel) const } -void COpenGLExtensionHandler::dumpFramebufferFormats() const -{ -#ifdef _IRR_WINDOWS_API_ - HDC hdc=wglGetCurrentDC(); - core::stringc wglExtensions; -#ifdef WGL_ARB_extensions_string - PFNWGLGETEXTENSIONSSTRINGARBPROC irrGetExtensionsString = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); - if (irrGetExtensionsString) - wglExtensions = irrGetExtensionsString(hdc); -#elif defined(WGL_EXT_extensions_string) - PFNWGLGETEXTENSIONSSTRINGEXTPROC irrGetExtensionsString = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)wglGetProcAddress("wglGetExtensionsStringEXT"); - if (irrGetExtensionsString) - wglExtensions = irrGetExtensionsString(hdc); -#endif - const bool pixel_format_supported = (wglExtensions.find("WGL_ARB_pixel_format") != -1); - const bool multi_sample_supported = ((wglExtensions.find("WGL_ARB_multisample") != -1) || - (wglExtensions.find("WGL_EXT_multisample") != -1) || (wglExtensions.find("WGL_3DFX_multisample") != -1) ); -#ifdef _DEBUG - os::Printer::log("WGL_extensions", wglExtensions); -#endif - -#ifdef WGL_ARB_pixel_format - PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormat_ARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB"); - if (pixel_format_supported && wglChoosePixelFormat_ARB) - { - // This value determines the number of samples used for antialiasing - // My experience is that 8 does not show a big - // improvement over 4, but 4 shows a big improvement - // over 2. - - PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribiv_ARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)wglGetProcAddress("wglGetPixelFormatAttribivARB"); - if (wglGetPixelFormatAttribiv_ARB) - { - int vals[128]; - int atts[] = { - WGL_NUMBER_PIXEL_FORMATS_ARB, - WGL_DRAW_TO_BITMAP_ARB, - WGL_ACCELERATION_ARB, - WGL_NEED_PALETTE_ARB, - WGL_NEED_SYSTEM_PALETTE_ARB, - WGL_SWAP_LAYER_BUFFERS_ARB, - WGL_SWAP_METHOD_ARB, - WGL_NUMBER_OVERLAYS_ARB, - WGL_NUMBER_UNDERLAYS_ARB, - WGL_TRANSPARENT_ARB, - WGL_TRANSPARENT_RED_VALUE_ARB, - WGL_TRANSPARENT_GREEN_VALUE_ARB, - WGL_TRANSPARENT_BLUE_VALUE_ARB, - WGL_TRANSPARENT_ALPHA_VALUE_ARB, - WGL_TRANSPARENT_INDEX_VALUE_ARB, - WGL_SHARE_DEPTH_ARB, - WGL_SHARE_STENCIL_ARB, - WGL_SHARE_ACCUM_ARB, - WGL_SUPPORT_GDI_ARB, - WGL_SUPPORT_OPENGL_ARB, - WGL_DOUBLE_BUFFER_ARB, - WGL_STEREO_ARB, - WGL_PIXEL_TYPE_ARB, - WGL_COLOR_BITS_ARB, - WGL_RED_BITS_ARB, - WGL_RED_SHIFT_ARB, - WGL_GREEN_BITS_ARB, - WGL_GREEN_SHIFT_ARB, - WGL_BLUE_BITS_ARB, - WGL_BLUE_SHIFT_ARB, - WGL_ALPHA_BITS_ARB, - WGL_ALPHA_SHIFT_ARB, - WGL_ACCUM_BITS_ARB, - WGL_ACCUM_RED_BITS_ARB, - WGL_ACCUM_GREEN_BITS_ARB, - WGL_ACCUM_BLUE_BITS_ARB, - WGL_ACCUM_ALPHA_BITS_ARB, - WGL_DEPTH_BITS_ARB, - WGL_STENCIL_BITS_ARB, - WGL_AUX_BUFFERS_ARB -#ifdef WGL_ARB_render_texture - ,WGL_BIND_TO_TEXTURE_RGB_ARB //40 - ,WGL_BIND_TO_TEXTURE_RGBA_ARB -#endif -#ifdef WGL_ARB_pbuffer - ,WGL_DRAW_TO_PBUFFER_ARB //42 - ,WGL_MAX_PBUFFER_PIXELS_ARB - ,WGL_MAX_PBUFFER_WIDTH_ARB - ,WGL_MAX_PBUFFER_HEIGHT_ARB -#endif -#ifdef WGL_ARB_framebuffer_sRGB - ,WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB //46 -#endif -#ifdef WGL_ARB_multisample - ,WGL_SAMPLES_ARB //47 - ,WGL_SAMPLE_BUFFERS_ARB -#endif -#ifdef WGL_EXT_depth_float - ,WGL_DEPTH_FLOAT_EXT //49 -#endif - ,0,0,0,0 - }; - size_t nums = sizeof(atts)/sizeof(int); - const bool depth_float_supported= (wglExtensions.find("WGL_EXT_depth_float") != -1); - if (!depth_float_supported) - { - memmove(&atts[49], &atts[50], (nums-50)*sizeof(int)); - nums -= 1; - } - if (!multi_sample_supported) - { - memmove(&atts[47], &atts[49], (nums-49)*sizeof(int)); - nums -= 2; - } - const bool framebuffer_sRGB_supported= (wglExtensions.find("WGL_ARB_framebuffer_sRGB") != -1); - if (!framebuffer_sRGB_supported) - { - memmove(&atts[46], &atts[47], (nums-47)*sizeof(int)); - nums -= 1; - } - const bool pbuffer_supported = (wglExtensions.find("WGL_ARB_pbuffer") != -1); - if (!pbuffer_supported) - { - memmove(&atts[42], &atts[46], (nums-46)*sizeof(int)); - nums -= 4; - } - const bool render_texture_supported = (wglExtensions.find("WGL_ARB_render_texture") != -1); - if (!render_texture_supported) - { - memmove(&atts[40], &atts[42], (nums-42)*sizeof(int)); - nums -= 2; - } - wglGetPixelFormatAttribiv_ARB(hdc,0,0,1,atts,vals); - const int count = vals[0]; - atts[0]=WGL_DRAW_TO_WINDOW_ARB; - for (int i=1; i(glGetString(GL_VERSION))); diff --git a/source/Irrlicht/COpenGLExtensionHandler.h b/source/Irrlicht/COpenGLExtensionHandler.h index 5f3c4226..3b4147b9 100644 --- a/source/Irrlicht/COpenGLExtensionHandler.h +++ b/source/Irrlicht/COpenGLExtensionHandler.h @@ -1010,8 +1010,6 @@ class COpenGLExtensionHandler //! show all features with availability void dump(ELOG_LEVEL logLevel) const; - void dumpFramebufferFormats() const; - // Some variables for properties bool StencilBuffer; bool TextureCompressionExtension;