From 1d98a66ed535f334443e0776e09b7eb6ab95b8ae Mon Sep 17 00:00:00 2001 From: jpaone Date: Mon, 26 Aug 2024 15:56:03 -0600 Subject: [PATCH] Issue #37: Does not print full list of extensions with OpenGL statistics, created a separate function that can be called for full listing --- CHANGELOG.md | 4 ++++ OpenGLUtils.hpp | 23 +++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ab3bd86..9905156f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ - Updated glm dependency to v1.0.1 - Added half sphere and dome to HUD example - Fixed shader uniform debug output typos +- OpenGLUtils: Does not print full list of extensions with OpenGL statistics, created a separate function that can be called for full listing +- MD5Camera: fixed bug where inverseQ normalization was being discarded and not set +- MD5Model: added GLM_ENABLE_EXPERIMENTAL for quaternion header to match GLM v1.0.1 +- OrthographicCamera: fixed bug where _updateProjectionMatrix was not declared inline ## v 5.3.0 - 16 Aug 2024 - Removed [[nodiscard]] from ModelLoader::draw() to silence warnings. Currently method always returns true so the return value isn't applicable. diff --git a/OpenGLUtils.hpp b/OpenGLUtils.hpp index b8aa092b..e9b16295 100755 --- a/OpenGLUtils.hpp +++ b/OpenGLUtils.hpp @@ -79,6 +79,10 @@ namespace CSCI441 { * @brief Prints information about our OpenGL context */ void printOpenGLInfo(); + /** + * @brief Prints the list of available extensions + */ + [[maybe_unused]] void printOpenGLExtensions(); }; } @@ -102,9 +106,10 @@ namespace CSCI441_INTERNAL { // Outward facing function implementations inline void CSCI441::OpenGLUtils::printOpenGLInfo() { - GLint major, minor; + GLint major = 0, minor = 0, numExtensions = 0; glGetIntegerv(GL_MAJOR_VERSION, &major); glGetIntegerv(GL_MINOR_VERSION, &minor); + glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions); fprintf( stdout, "\n[INFO]: /--------------------------------------------------------\\\n" ); fprintf( stdout, "[INFO]: | OpenGL Information |\n" ); @@ -113,6 +118,7 @@ inline void CSCI441::OpenGLUtils::printOpenGLInfo() { fprintf( stdout, "[INFO]: | OpenGL Renderer: %35s |\n", glGetString(GL_RENDERER) ); fprintf( stdout, "[INFO]: | OpenGL Vendor: %35s |\n", glGetString(GL_VENDOR) ); fprintf( stdout, "[INFO]: | Shading Version: %35s |\n", glGetString(GL_SHADING_LANGUAGE_VERSION) ); + fprintf( stdout, "[INFO]: | Number of Extensions: %30d |\n", numExtensions ); if( (major >= 2 && minor >= 0) || major > 2 ) { CSCI441_INTERNAL::printOpenGLParamHeader( 2, 0 ); @@ -234,19 +240,20 @@ inline void CSCI441::OpenGLUtils::printOpenGLInfo() { CSCI441_INTERNAL::printOpenGLParam( "[INFO]: | Max # Combined Shader Output Resources: %11d |\n", GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES ); } + fprintf( stdout, "[INFO]: \\--------------------------------------------------------/\n\n"); +} + +[[maybe_unused]] +inline void CSCI441::OpenGLUtils::printOpenGLExtensions() { GLint numExtensions = 0; glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions); - fprintf( stdout, "[INFO]: >--------------------------------------------------------<\n" ); - fprintf( stdout, "[INFO]: | %3d OpenGL Extensions |\n", numExtensions ); - fprintf( stdout, "[INFO]: >--------------------------------------------------------<\n" ); + + fprintf( stdout, "[INFO]: Number of Extensions: %4d\n", numExtensions ); for (int i = 0; i < numExtensions; i++) { - fprintf( stdout, "[INFO]: | Extension #%2d: %37s |\n", (i+1), glGetStringi(GL_EXTENSIONS, i) ); + fprintf( stdout, "[INFO]: Extension #%3d: %s \n", (i+1), glGetStringi(GL_EXTENSIONS, i) ); } - - fprintf( stdout, "[INFO]: \\--------------------------------------------------------/\n\n"); } - //********************************************************************************** //********************************************************************************** // Internal function implementations