allegro5 icon indicating copy to clipboard operation
allegro5 copied to clipboard

Render to existing window

Open pipe01 opened this issue 3 years ago • 2 comments
trafficstars

I would like to render to an existing window and existing OpenGL context, is there any way to do that?

pipe01 avatar Sep 10 '22 16:09 pipe01

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.

sammonius avatar Nov 23 '22 15:11 sammonius

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.

EdgarReynaldo avatar Nov 24 '22 15:11 EdgarReynaldo