Print full GL_EXTENSIONS list for OpenGL contexts before 3.0

Printing GL_EXTENSIONS list might be cut off for OpenGL contexts
before 3.0 due to glConfig.extensions_string being a limited length.
Instead get the full extensions list directly.

This was already fixed for OpenGL 3.0 and later contexts.
This commit is contained in:
Zack Middleton 2021-10-23 07:31:38 -04:00
parent f9ba7c667d
commit f734a2da9a
2 changed files with 4 additions and 2 deletions

View file

@ -916,6 +916,7 @@ void GfxInfo_f( void )
ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glConfig.renderer_string );
ri.Printf( PRINT_ALL, "GL_VERSION: %s\n", glConfig.version_string );
ri.Printf( PRINT_ALL, "GL_EXTENSIONS: " );
// glConfig.extensions_string is a limited length so get the full list directly
if ( qglGetStringi )
{
GLint numExtensions;
@ -929,7 +930,7 @@ void GfxInfo_f( void )
}
else
{
R_PrintLongString( glConfig.extensions_string );
R_PrintLongString( (char *) qglGetString( GL_EXTENSIONS ) );
}
ri.Printf( PRINT_ALL, "\n" );
ri.Printf( PRINT_ALL, "GL_MAX_TEXTURE_SIZE: %d\n", glConfig.maxTextureSize );

View file

@ -1048,6 +1048,7 @@ void GfxInfo_f( void )
ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glConfig.renderer_string );
ri.Printf( PRINT_ALL, "GL_VERSION: %s\n", glConfig.version_string );
ri.Printf( PRINT_ALL, "GL_EXTENSIONS: " );
// glConfig.extensions_string is a limited length so get the full list directly
if ( qglGetStringi )
{
GLint numExtensions;
@ -1061,7 +1062,7 @@ void GfxInfo_f( void )
}
else
{
R_PrintLongString( glConfig.extensions_string );
R_PrintLongString( (char *) qglGetString( GL_EXTENSIONS ) );
}
ri.Printf( PRINT_ALL, "\n" );
ri.Printf( PRINT_ALL, "GL_MAX_TEXTURE_SIZE: %d\n", glConfig.maxTextureSize );