Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/HWDetect.cpp
Show All 38 Lines | |||||
#include "ps/ConfigDB.h" | #include "ps/ConfigDB.h" | ||||
#include "ps/Filesystem.h" | #include "ps/Filesystem.h" | ||||
#include "ps/GameSetup/Config.h" | #include "ps/GameSetup/Config.h" | ||||
#include "ps/Profile.h" | #include "ps/Profile.h" | ||||
#include "ps/scripting/JSInterface_Debug.h" | #include "ps/scripting/JSInterface_Debug.h" | ||||
#include "ps/UserReport.h" | #include "ps/UserReport.h" | ||||
#include "ps/VideoMode.h" | #include "ps/VideoMode.h" | ||||
#ifdef SDL_VIDEO_DRIVER_X11 | #ifdef SDL_VIDEO_DRIVER_X11 | ||||
Stan: #if defined(SDL_VIDEO_DRIVER_X11) && !CONFIG2_GLES | |||||
#include <GL/glx.h> | #include <GL/glx.h> | ||||
#include "SDL_syswm.h" | #include "SDL_syswm.h" | ||||
// Define the GLX_MESA_query_renderer macros if built with | // Define the GLX_MESA_query_renderer macros if built with | ||||
// an old Mesa (<10.0) that doesn't provide them | // an old Mesa (<10.0) that doesn't provide them | ||||
#ifndef GLX_MESA_query_renderer | #ifndef GLX_MESA_query_renderer | ||||
#define GLX_MESA_query_renderer 1 | #define GLX_MESA_query_renderer 1 | ||||
#define GLX_RENDERER_VENDOR_ID_MESA 0x8183 | #define GLX_RENDERER_VENDOR_ID_MESA 0x8183 | ||||
▲ Show 20 Lines • Show All 651 Lines • ▼ Show 20 Lines | #else // CONFIG2_GLES | ||||
INTEGER(MAX_VERTEX_TEXTURE_IMAGE_UNITS); | INTEGER(MAX_VERTEX_TEXTURE_IMAGE_UNITS); | ||||
INTEGER(MAX_FRAGMENT_UNIFORM_VECTORS); | INTEGER(MAX_FRAGMENT_UNIFORM_VECTORS); | ||||
INTEGER(MAX_TEXTURE_IMAGE_UNITS); | INTEGER(MAX_TEXTURE_IMAGE_UNITS); | ||||
INTEGER(MAX_RENDERBUFFER_SIZE); | INTEGER(MAX_RENDERBUFFER_SIZE); | ||||
#endif // CONFIG2_GLES | #endif // CONFIG2_GLES | ||||
#ifdef SDL_VIDEO_DRIVER_X11 | // TODO: Running on X11 doesn’t imply that we use GLX, EGL is a totally valid | ||||
// API on this platform too. | |||||
#if defined(SDL_VIDEO_DRIVER_X11) && !CONFIG2_GLES | |||||
Not Done Inline ActionsWhat exactly is there TODO about this? JoshuaJB: What exactly is there TODO about this? | |||||
Done Inline ActionsIt’s because this code currently assumes that if the X11 video driver is enabled in SDL2, the user is using X11 and can query GLX functions. There are two cases where this breaks:
For now I disabled it when CONFIG2_GLES is enabled because SDL2 defaults to EGL in this case, but it would be useful to also support it on desktop GL. linkmauve: It’s because this code currently assumes that if the X11 video driver is enabled in SDL2, the… | |||||
Not Done Inline ActionsI think it should be the same comment as above. vladislavbelov: I think it should be the same comment as above. | |||||
#define GLXQCR_INTEGER(id) do { \ | #define GLXQCR_INTEGER(id) do { \ | ||||
unsigned int i = UINT_MAX; \ | unsigned int i = UINT_MAX; \ | ||||
if (pglXQueryCurrentRendererIntegerMESA(id, &i)) \ | if (pglXQueryCurrentRendererIntegerMESA(id, &i)) \ | ||||
scriptInterface.SetProperty(settings, #id, i); \ | scriptInterface.SetProperty(settings, #id, i); \ | ||||
} while (false) | } while (false) | ||||
#define GLXQCR_INTEGER2(id) do { \ | #define GLXQCR_INTEGER2(id) do { \ | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
#if defined(SDL_VIDEO_DRIVER_X11) && !CONFIG2_GLES