mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 01:38:27 +00:00
Fixed bugs 2570, 3145, improved OpenGL ES context support on Windows and X11
Mark Callow The attached patch does the following for the X11 and Windows platforms, the only ones where SDL attempts to use context_create_es_profile: - Adds SDL_HINT_OPENGL_ES_DRIVER by which the application can say to use the OpenGL ES driver & EGL rather than the Open GL driver. (For bug #2570) - Adds code to {WIN,X11}_GL_InitExtensions to determine the maximum OpenGL ES version supported by the OpenGL driver (for bug #3145) - Modifies the test that determines whether to use the OpenGL driver or the real OpenGL ES driver to take into account the hint, the requested and supported ES version and whether ES 1.X is being requested. (For bug #2570 & bug #3145) - Enables the testgles2 test for __WINDOWS__ and __LINUX__ and adds the test to the VisualC projects. With the fix in place I have run testdraw2, testgl and testgles2 without any issues and have run my own apps that use OpenGL, OpenGL ES 3 and OpenGL ES 1.1.
This commit is contained in:
parent
bf11cd5084
commit
a52d48c5ab
12 changed files with 201 additions and 35 deletions
|
@ -744,6 +744,37 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling what driver to use for OpenGL ES contexts.
|
||||
*
|
||||
* On some platforms, currently Windows and X11, OpenGL drivers may support
|
||||
* creating contexts with an OpenGL ES profile. By default SDL uses these
|
||||
* profiles, when available, otherwise it attempts to load an OpenGL ES
|
||||
* library, e.g. that provided by the ANGLE project. This variable controls
|
||||
* whether SDL follows this default behaviour or will always load an
|
||||
* OpenGL ES library.
|
||||
*
|
||||
* Circumstances where this is useful include
|
||||
* - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,
|
||||
* or emulator, e.g. those from ARM, Imagination or Qualcomm.
|
||||
* - Resolving OpenGL ES function addresses at link time by linking with
|
||||
* the OpenGL ES library instead of querying them at run time with
|
||||
* SDL_GL_GetProcAddress.
|
||||
*
|
||||
* Caution: for an application to work with the default behaviour across
|
||||
* different OpenGL drivers it \i must query the OpenGL ES function
|
||||
* addresses at run time using SDL_GL_GetProcAddress.
|
||||
*
|
||||
* This variable is ignored on most platforms because OpenGL ES is native
|
||||
* or not supported.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Use ES profile of OpenGL, if available. (Default when not set.)
|
||||
* "1" - Load OpenGL ES library using the default library names.
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue