Invalid renderer |
blackwolf12333
|
Hi,
I have been working on a little engine for a couple of days now, but one problem I can't solve is the fact that SDL won't give me a valid renderer. I create a new renderer with SDL_CreateRenderer(this->window, -1, SDL_RENDERER_SOFTWARE);. I use SDL_RENDERER_SOFTWARE because I assume that that should always work. However even this doesn't work. When I put 0 for flags or any other flag it will give me an Invalid renderer error anyway. I wonder if this is a problem with my code, or if there might be something wrong with my SDL install, or some other part of the graphics stack. I'm working on Linux btw. Source code for my engine can be found here, and the init code is here. Thanks in advance, Peter. |
|||||||||||
|
blackwolf12333
|
I have tried using all available renderers, including the software one. I still get the error when I comment out the loop that gets all the renderers. This is probably the weirdest bug I have ever seen so far. |
|||||||||||||
|
blackwolf12333
|
I also tried building a minimal program with just a main function and basic SDL init functions. I still get the same error. I am completely lost :/ |
|||||||||||||||
|
G-Shadow
|
What SDL_GetError() says after renderer creation failure?
|
|||||||||||
|
blackwolf12333
|
I fixed it. I don't know why, but calling SDL_GL_LoadLibrary("/usr/lib/libGL.so"); fixed it. I'm guessing because I was trying to use the opengl backend that it needs to load that library. But I would expect that to happen in SDL_Init. |
|||||||||||||
|