| Summary: | Can't create OpenGL window if opengle was enabled | ||
|---|---|---|---|
| Product: | SDL | Reporter: | sparkaround |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq, shirishag75 |
| Version: | HG 2.0 | Keywords: | target-2.0.0 |
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: |
Trial patch to add SDL_VIDEO_X11_USEEGL env var
0001-Fix-memleaks-in-X11_CreateDevice-error-paths 0002-Rename-envvar-to-overwrite-X11-EGL-library-name.patch 0003-Fix-OpenGL-initialization-when-OpenGL-and-OpenGLES-i.patch |
||
|
Description
sparkaround
2012-02-23 00:16:34 UTC
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. Created attachment 900 [details]
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
Created attachment 902 [details]
0001-Fix-memleaks-in-X11_CreateDevice-error-paths
Created attachment 903 [details]
0002-Rename-envvar-to-overwrite-X11-EGL-library-name.patch
Created attachment 904 [details]
0003-Fix-OpenGL-initialization-when-OpenGL-and-OpenGLES-i.patch
I went ahead and incorporated the changes from Scott Percival. Please let me know how this works. (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. This one is fixed.
./testrendercopyex --info render
Built-in render drivers:
Renderer opengl:
Flags: 0x0000000E (Accelerated | PresentVSync | 0x00000008)
Texture formats (1): ARGB8888
Renderer opengles2:
Flags: 0x0000000E (Accelerated | PresentVSync | 0x00000008)
Texture formats (4): ABGR8888, ARGB8888, RGB888, BGR888
Renderer opengles:
Flags: 0x0000000E (Accelerated | PresentVSync | 0x00000008)
Texture formats (1): ABGR8888
Renderer software:
Flags: 0x00000009 (0x00000001 | 0x00000008)
Texture formats (8): RGB555, RGB565, RGB888, BGR888, ARGB8888, RGBA8888, ABGR8888, BGRA8888
Current renderer:
Renderer opengl:
Flags: 0x0000000A (Accelerated | 0x00000008)
Texture formats (3): ARGB8888, YV12, IYUV
Max Texture Size: 16384x16384
|