RE: [AD] No more video/system bitmaps

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> the current API is not thread-safe and you need to pass it a
destination
> anyway. It's beside the point I was trying to make though, which was
about
> drawing to *multiple displays*.
> 
> At that point, it makes sense to have *multiple* states, if multiple
> threads want to draw things to different displays.


OpenGL solves this by forcing each thread to draw to different GL
contexts (undefined behavior occurs if you violate this rule). GL
functions, before doing any of their work, first look up which thread
they're in and which context is current for that thread. They then apply
their state / command to that context.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/