From a4ae8d0d2e294c6e1cf1d32a168dea621605a0cf Mon Sep 17 00:00:00 2001 From: Ilya Shurumov Date: Sat, 21 Nov 2020 02:10:57 +0600 Subject: [PATCH] - [Psy-X] lower OpenGL from 3.3 to 3.1 - [Psy-X] print OpenGL info after initialization --- src_rebuild/PsyX/EMULATOR.C | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src_rebuild/PsyX/EMULATOR.C b/src_rebuild/PsyX/EMULATOR.C index 3dc1dc69..93886479 100644 --- a/src_rebuild/PsyX/EMULATOR.C +++ b/src_rebuild/PsyX/EMULATOR.C @@ -235,8 +235,8 @@ static int Emulator_InitialiseSDL(char* windowName, int width, int height, int f SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); #elif defined(OGL) SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY); #endif #if defined(OGL) || defined(OGLES) @@ -272,9 +272,19 @@ static int Emulator_InitialiseGLExt() GLenum err = gladLoadGL(); if (err == 0) - { return FALSE; - } + + const char* rend = (const char *) glGetString(GL_RENDERER); + const char* vendor = (const char *) glGetString(GL_VENDOR); + eprintf("*Video adapter: %s by %s\n", rend, vendor); + + const char* versionStr = (const char *) glGetString(GL_VERSION); + eprintf("*OpenGL version: %s\n", versionStr); + + const char* glslVersionStr = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION); + eprintf("*GLSL version: %s\n", glslVersionStr); + + #endif return TRUE; }