You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.0 Reported for operating system, platform: Linux, x86
Comments on the original bug report:
On 2012-02-23 00:16:34 +0000, wrote:
Environment
Mesa on my linux box compiled with built-in gles1 and gles2.
Both opengl and opengles were enabled in SDL (rev 6302) by default.
BUGS
SDL_CreateWindow(title, x, y, w, h, SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL) return NULL and can't get any error message from SDL_GetError().
Window can be created with window = SDL_CreateWindow(title, x,y, w, h, SDL_WINDOW_SHOWN), but SDL_CreateRender(window, -1, SDL_RENDERER_ACCELERATED) return NULL. SDL_GetError() return "Couldn't find matching render driver".
Workaround
Compile SDL with --enable-video-opengles=no.
A rough analysis of bug1
Those bugs may be due to this(not sure):
src/video/SDL_video.c
SDL_Window *
SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
{
...
#if (SDL_VIDEO_OPENGL && MACOSX) || IPHONEOS || ANDROID
flags |= SDL_WINDOW_OPENGL;
#endif
if (flags & SDL_WINDOW_OPENGL) {
if (!_this->GL_CreateContext) {
SDL_SetError("No OpenGL support in video driver");
return NULL;
}
SDL_GL_LoadLibrary(NULL);
}
...
if (_this->CreateWindow && _this->CreateWindow(_this, window) < 0) {
SDL_DestroyWindow(window);
return NULL;
}
...
If X11_GL_GetVisual return NULL, X11_GLES_GetVisual will not be called.
src/video/x11/SDL_x11opengl.c:
XVisualInfo *
X11_GL_GetVisual(_THIS, Display * display, int screen)
{
...
if (!_this->gl_data) {
/* The OpenGL library wasn't loaded, SDL_GetError() should have info */
return NULL;
}
...
Since X11_GL_LoadLibrary was not called, _this->gl_data was NULL. So X11_GL_GetVisual return NULL. Then SDL_CreateWindow return NULL.
On 2012-06-20 13:57:14 +0000, Gabriel Jacobo wrote:
I think I was bitten by this today, after installing the MESA EGL stuff, I lost the OpenGL functionality. If you can figure out a patch I'll test it.
On 2012-07-15 08:41:26 +0000, David Gow wrote:
Created attachment 900
Trial patch to add SDL_VIDEO_X11_USEEGL env var
I've coded up a quick patch which adds the environment variable SDL_VIDEO_X11_USEEGL. When set to 0, glx is used (with desktop OpenGL), when nonzero egl (with whatever API is supported, be it GLES1.1 or GLES2) is used. If not set, it will default to GLX (as it is more popular) if it is available.
The discussion on the list about whether or not using an environment variable is a good idea at all is important. Personally, I think that adding a SDL_WINDOW_OPENGLES flag is probably the right solution, as that would actually create a distinction between the two at an API level. It would, of course, also be a lot of work, and would probably break a lot of existing code.
Thoughts?
-- David
On 2012-07-18 14:06:59 +0000, Andre Heider wrote:
Created attachment 902
0001-Fix-memleaks-in-X11_CreateDevice-error-paths
On 2012-07-18 14:07:14 +0000, Andre Heider wrote:
Created attachment 903
0002-Rename-envvar-to-overwrite-X11-EGL-library-name.patch
On 2012-07-18 14:07:26 +0000, Andre Heider wrote:
Created attachment 904
0003-Fix-OpenGL-initialization-when-OpenGL-and-OpenGLES-i.patch
On 2012-07-18 15:19:09 +0000, Sam Lantinga wrote:
I went ahead and incorporated the changes from Scott Percival. Please let me know how this works.
On 2013-07-12 22:15:23 +0000, Ryan C. Gordon wrote:
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)
Tagging a bunch of bugs as target-2.0.0, Priority 2.
This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible.
That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship.
Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.
Thanks!
--ryan.
On 2013-07-12 22:18:02 +0000, Gabriel Jacobo wrote:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.0
Reported for operating system, platform: Linux, x86
Comments on the original bug report:
On 2012-02-23 00:16:34 +0000, wrote:
On 2012-06-20 13:57:14 +0000, Gabriel Jacobo wrote:
On 2012-07-15 08:41:26 +0000, David Gow wrote:
On 2012-07-18 14:06:59 +0000, Andre Heider wrote:
On 2012-07-18 14:07:14 +0000, Andre Heider wrote:
On 2012-07-18 14:07:26 +0000, Andre Heider wrote:
On 2012-07-18 15:19:09 +0000, Sam Lantinga wrote:
On 2013-07-12 22:15:23 +0000, Ryan C. Gordon wrote:
On 2013-07-12 22:18:02 +0000, Gabriel Jacobo wrote:
The text was updated successfully, but these errors were encountered: