allegro5
allegro5 copied to clipboard
Render to existing window
trafficstars
I would like to render to an existing window and existing OpenGL context, is there any way to do that?
Rather than creating an ALLEGRO_DISPLAY, just create a bitmap and set it as the target bitmap using al_set_target_bitmap. I don't know anything about OpenGL, but from there it should be pretty easy to just draw the bitmap onto the conext with OpenGL's API.
This is a useful feature for compatiblity with other libraries that each have their own or use another's opengl context. Basically it involves exposing the rendering contexts on each platform through an addition to the api.