OpenGL ES 3.0/3.1 |
OpenGL ES 3.0/3.1 |
Steffen Hein
Guest
|
Yes, just set the following before creating your OpenGL context:
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); // or 1 Context creation will fail (SDL_GL_CreateContext() will return NULL) on non-ES3 hardware, so make sure to build in a fallback for that case, if you want to support older hardware as well.
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
OpenGL ES 3.0/3.1 |
Alex Szpakowski
Guest
|
OpenGL ES 3+ context creation may be broken when the EGL backend (used on Android, Linux, Windows, etc.) is used, FWIW: https://bugzilla.libsdl.org/show_bug.cgi?id=2865
It definitely works on iOS though (since iOS doesn’t use EGL) – provided you’re using the latest SDL source code from Mercurial.
|
|||||||||||||||
|
OpenGL ES 3.0/3.1 |
Emmanuel Gil Peyrot
Guest
|
On Sat, Apr 18, 2015 at 08:22:33PM -0300, Alex Szpakowski wrote:
On Mesa at least, a GLES 2.0 context will automatically be promoted to 3.0 if the driver supports it (most do, AFAIK, and all desktop ones), so even with this issue you can still use it. -- Emmanuel Gil Peyrot _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
OpenGL ES 3.0/3.1 |
Steffen Hein
Guest
|
Thanks for the info. I had only tested ES3+ support on iOS so far.
|
|||||||||||||||||
|
OpenGL ES 3.0/3.1 |
Alex Szpakowski
Guest
|
Well, that will only work if you request an OpenGL ES 2 context. If you request an OpenGL ES 3 context I believe SDL’s EGL code will try to request an OpenGL ES 1 context instead (and drivers can’t promote ES1 context requests to ES3, since they aren’t compatible.)
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
yaronct
|
Thanx, I'll try in with the latest SDL source code from Mercurial.
Btw, it says that my first message in this thread was posted on April 19, 2015. However I posted the message about a month ago. Therefore only now I got answers... Any idea why? |
|||||||||||
|
OpenGL ES 3.0/3.1 |
Emmanuel Gil Peyrot
Guest
|
On Sun, Apr 19, 2015 at 11:33:04AM +0000, yaronct wrote:
We got a lot of messages from March on the mailing list just yesterday, they were probably kept in a queue somewhere. -- Emmanuel Gil Peyrot _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|