guisan
guisan copied to clipboard
Black screen
Hello! I am trying to add this GUI system into my game engine, but all I get is a black screen when calling gui->draw(). Has anyone experienced this?
FWIW I attempted to build the sdl2widgets example (@ ceea04aaf7cbab101a149b6f4a64a99719d959a5) on SDL 2.0.8, SDL_ttf 2.0.14, SDL_image 2.0.5, and SDL2_mixer 2.0.4, with OpenGL entirely disabled in my SDL2, and I'm receiving a similar completely black screen (Metal on macOS 11.2).
Probably not much help but I might as well post what I find trying to find truly backend-agnostic SDL GUI libraries.
When I wrote the code which actually makes use of the SDL2 optimizations (line primitives, rectangles, Textures), which sdl2widgets aims to demonstrate, I also had some rendering issues and I picked the option combination which worked on my machine. I only work on Windows or Linux, so I may have missed something on Mac. Regarding the use of OpenGL more generally, this was supported by Guichan (the previous installment of this library for SDL 1.2) but it was dropped in this version AFAIK. If you come across this code again, you will likely have to adapt it to Guisan, but this would definitely be a worthy and welcomed addition.
So this one is limited to Mac? I personally haven't seen it... but am exclusively Linux and Haiku.