| Summary: | No OpenGL headers when compiling -> no working Software renderer at runtime neither | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ellie <etc0de> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
|
Description
Ellie
2011-12-15 17:19:31 UTC
SDL will no longer compile if there aren't any renderers available. http://hg.libsdl.org/SDL/rev/aa4d1d639f2e Thanks! Are you sure that fixes this case? The problem appeared to me to be different than SDL allowing no renderers. In fact, there should have been one, the software renderer! X11 dev libs should have been there, just OpenGL headers weren't. I will test now if with the latest SDL revision, the software renderer is available as it should be (I still have the faulty situation conserved in a virtual machine for further testing). If the latest revision still doesn't offer software rendering in that situation, I think this bug should be reopened since the software renderer should be available even if the OpenGL one isn't, right? (assuming X11 dev headers are there) Will report back soon with test results. You're right, the software renderer is still there, and creating a renderer still fails. Actually, I did some more digging and if you don't have OpenGL, but you do have X11, the software renderer should still work. I verified that this is the case on Ubuntu by configuring SDL with --disable-video-opengl: slouken@ubuntu:~/projects/SDL/test$ ./testgl Couldn't set GL mode: No OpenGL support in video driver slouken@ubuntu:~/projects/SDL/test$ ./testsprite2 1949.35 frames per second Can you debug it a bit more and see what is actually happening in your case? I messed up the debug output/misinterpreted it. It was actually my own fault because it ran into another code branch than I thought it did, and that code branch said: SDL_Renderer* mainrenderer = SDL_CreateRenderer(mainwindow, -1, SDL_RENDERER_ACCELERATED|SDL_PRESENT_VSYNC); Obviously, no such renderer was available under the given conditions. As soon as I changed the flags to 0, the problem went away. Sorry for wasting your time with my own bug :-) should probably do a minimal test case again next time. The only suggestion I would still have resulting out of this is: Maybe "index must be in the range of 0 - 0" isn't as good as "no renderer with the given flags is available" which I'd suggest instead to make the problem obvious for other misguided souls that run into a similar situation. No problem. I'm wondering where that message came from, because looking at the code, the relevant message would be: "Couldn't find matching render driver" Are you still seeing that same message with the latest snapshot? http://www.libsdl.org/tmp/SDL-1.3.zip |