Commit Graph

25 Commits

Author SHA1 Message Date
Sam Lantinga
7334a2a1b5 Fixed bug 3940 - Add support for EGL_SURFACE_TYPE
tomwardio

Add support to be able to set EGL_SURFACE_TYPE bits when creating an EGL config. This is usefule when wanting to create pixel buffer surfaces in custom video drivers.
2017-11-04 09:07:33 -07:00
Conn O'Griofa
bf3e363d4b Raspberry Pi: fix ES 1/PVR support & autodetect Mesa driver
* The brcmGLESv2 vendor library also supports ES PVR/1 profiles
* Fallback to standard Mesa libraries if the VC4 driver is loaded
2017-11-04 09:04:19 -07:00
Brandon Schaefer
e564da78b7 revert files I didnt mean to commit! 2017-09-29 10:15:44 -07:00
Brandon Schaefer
e27f12e0da wayland: Fix bug 3814 -Wmissing-field-initializers 2017-09-29 10:07:37 -07:00
Brandon Schaefer
466ba57d42 [egl/mir] Need eglGetProc to find gl 4.5 core profile extensions 2017-09-21 18:38:07 -07:00
Ryan C. Gordon
0c892abcd0 raspberrypi: The latest Raspbian moved its EGL and GLES2 libs elsewhere.
Now we try the new (hardware-specific) pathnames first, and if those fail to
load, we'll try the more generic names that earlier versions of Raspbian used.

Fixes Bugzilla #3800.
2017-09-06 19:34:23 -04:00
Ryan C. Gordon
21e32bac10 egl: Cast to size_t, in case platform's NativeDisplayType isn't a pointer.
(fixes compiler warnings on QNX.)
2017-08-29 16:30:49 -04:00
Sam Lantinga
003d491f86 Fixed bug 3724 - Allow Angle Static Link
Carlos

We would like to add a switch (define) that allows us to compile Angle statically with SDL. That is, getting rid of the OpenGL DLL. Usually you need OpenGL to be loaded dynamically as DLL because implementation is provided by the system but no need with Angle.

Only 2 files need modification and it shouldn't affect current behaivor:
include/SDL_egl.h and src/video/SDL_egl.c, as in here

https://github.com/native-toolkit/sdl/pull/10/files

The flag name could be SDL_VIDEO_STATIC_ANGLE (instead of NATIVE_TOOLKIT_STATIC_ANGLE) as discussed here https://github.com/native-toolkit/sdl/pull/10

We have tested this with both Windows and UWP, using NME engine (https://github.com/haxenme/nme).

Releated issue: https://bugzilla.libsdl.org/show_bug.cgi?id=1820
2017-08-27 19:05:57 -07:00
Ethan Lee
685890a229 Fix KHR_no_error support 2017-08-24 22:57:42 -04:00
Ryan C. Gordon
d8fc70ea1e opengl: add support for GL_KHR_no_error.
This is completely untested!

Fixes Bugzilla #3721.
2017-08-24 21:30:53 -04:00
Sam Lantinga
96305832bc Fixed bug 3702 - Clear error messages of SDL_LoadObject for optional libraries
Simon Hug

Some code in SDL loads libraries with SDL_LoadObject to get more information or use newer APIs. SDL_LoadObject may fail, set an error message and SDL will continue with some fallback code. Since SDL will overwrite the error or exit the function with a return value that indicates success, the error form SDL_LoadObject for the optional stuff might as well be cleared right away.
2017-08-11 10:21:19 -07:00
Philipp Wiesemann
27de835dd2 emscripten: Fixed compiler warnings about integer to pointer conversions.
Found by buildbot.
2017-08-05 22:10:55 +02:00
Sam Lantinga
56363ebf61 Fixed bug 3690 - SDL2 KMS/DRM render context support
Manuel

The attached patch adds support for KMS/DRM context graphics.

It builds with no problem on X86_64 GNU/Linux systems, provided the needed libraries are present, and on ARM GNU/Linux systems that have KMS/DRM support and a GLES2 implementation.
Tested on Raspberry Pi: KMS/DRM is what the Raspberry Pi will use as default in the near future, once the propietary DispmanX API by Broadcom is overtaken by open graphics stack, it's possible to boot current Raspbian system in KMS mode by adding "dtoverlay=vc4-kms-v3d" to config.txt on Raspbian's boot partition.
X86 systems use KMS right away in every current GNU/Linux system.

Simple build instructions:

$./autogen.sh
$./configure --enable-video-kmsdrm
$make
2017-08-02 10:22:48 -07:00
Sam Lantinga
9171f71dbe Fixed warning in Android build 2017-02-10 09:41:16 -08:00
Sam Lantinga
67ed894353 Fixed bug 3529 - SDL_EGL_UnloadLibrary is not called at all on SDL_Quit
kaisyu

In case of OpenGLES, the sequences of loading and unloading driver library should be like that:

SDL_Init
  ...
  SDL_GL_LoadLibrary
    SDL_EGL_LoadLibrary
...
SDL_Quit
  ...
  SDL_GL_UnloadLibrary
    SDL_EGL_UnloadLibrary
...


However, according to my test results, the varible '_this->gl_config.driver_loaded' does not allow 'SDL_GL_UnloadLibrary' to call 'SDL_EGL_UnloadLibrary'.
2017-01-01 19:10:36 -08:00
David Ludwig
0cfa0aa11c improved SDL_GetError() output generated by EGL code
This change attempts to report the EGL error codes generated by SDL's calls
into EGL, along with the name of the EGL function that failed.
2016-12-29 11:49:18 -05:00
Sam Lantinga
45b774e3f7 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
fed8cbcdb6 Fixed build for EGL platforms 2016-12-09 05:00:35 -08:00
Sam Lantinga
5d5127c4a0 Fixed compiler warning - this should have been a const char pointer 2016-10-04 03:38:39 -07:00
Philipp Wiesemann
748b05289c EGL: Fixed SDL_GL_GetSwapInterval() returning -1 on error.
It should return 0 as a safe default on errors. -1 is returned for late swaps.
2016-05-11 21:10:41 +02:00
Sam Lantinga
42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Alex Szpakowski
5a3cc7f580 EGL: Added support for sRGB system framebuffers, when the required EGL extension is present. 2015-08-01 15:16:57 -03:00
Sam Lantinga
e93f90ae90 Trivial integer truncation warning fixes. 2015-07-30 10:01:04 -07:00
Philipp Wiesemann
72590685c0 Backed out changeset 4ad56dbf4a6f 2015-06-21 19:36:35 +02:00
Philipp Wiesemann
0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00