From e363ebe2e8707c4a4b200c107e831a7f0139e5e8 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 22 Dec 2010 14:21:40 +0100 Subject: [PATCH] Changed: #573 Get the maximum anisotropic value --- code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp | 6 ++++++ code/nel/src/3d/driver/opengl/driver_opengl_extension.h | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp index 010b26d1c..027a5234a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -1420,6 +1420,12 @@ void registerGlExtensions(CGlExtensions &ext) // Check GL_EXT_texture_filter_anisotropic ext.EXTTextureFilterAnisotropic = setupEXTTextureFilterAnisotropic(glext); + if (ext.EXTTextureFilterAnisotropic) + { + // get the maximum value + glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &ext.EXTTextureFilterAnisotropicMaximum); + } + // Check GL_EXT_framebuffer_object ext.FrameBufferObject = setupFrameBufferObject(glext); diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h index f96747ab9..465f6febd 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.h @@ -84,6 +84,8 @@ struct CGlExtensions bool FrameBufferMultisample; bool PackedDepthStencil; bool EXTTextureFilterAnisotropic; + float EXTTextureFilterAnisotropicMaximum; + // true if NVVertexProgram and if we know that VP is emulated bool NVVertexProgramEmulated; bool EXTSecondaryColor; @@ -170,6 +172,7 @@ public: NVTextureRectangle = false; EXTTextureRectangle = false; EXTTextureFilterAnisotropic = false; + EXTTextureFilterAnisotropicMaximum = 1.f; ARBTextureRectangle = false; ARBTextureNonPowerOfTwo = false; ARBMultisample = false; @@ -206,7 +209,7 @@ public: result += NVTextureRectangle ? "NVTextureRectangle " : ""; result += EXTTextureRectangle ? "EXTTextureRectangle " : ""; result += ARBTextureRectangle ? "ARBTextureRectangle " : ""; - result += EXTTextureFilterAnisotropic ? "EXTTextureFilterAnisotropic " : ""; + result += EXTTextureFilterAnisotropic ? "EXTTextureFilterAnisotropic (Maximum = " + NLMISC::toString(EXTTextureFilterAnisotropicMaximum) + ") " : ""; result += ARBTextureNonPowerOfTwo ? "ARBTextureNonPowerOfTwo " : ""; result += "texture stages(*) = "; result += NLMISC::toString(NbTextureStages); @@ -236,6 +239,7 @@ public: result += WGLEXTSwapControl ? "WGLEXTSwapControl " : ""; #elif defined(NL_OS_MAC) #elif defined(NL_OS_UNIX) + result += "\n GLX: "; result += GLXEXTSwapControl ? "GLXEXTSwapControl " : ""; result += GLXSGISwapControl ? "GLXSGISwapControl " : ""; result += GLXMESASwapControl ? "GLXMESASwapControl " : "";