The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.
SDL
Simple Directmedia Layer Forums
SDL2 drawing black inside window (from GtkWidget)
ScottRichards
Joined: 25 Apr 2015
Posts: 1
Location: UK
Posted: Sat Apr 25, 2015 10:00 pm
I'm attempting to get SDL2 to render into a gtk_drawing_area in GTK3 on linux (although evidentially i want this to work on windows too).
However after giving SDL2 access to the widget's window, and telling GTK not to render to the widget. I am unable to actually draw anything in the widget with SDL2, as everything appears black.
I have set up the following example to demostrate the problem. It is suppose to open a small GTK3 window, and let SDL2 draw in it with a coloured box.
Has anyone else had this problem? Or have any ideas how to resolve this drawing issue?