Re: [AD] OpenGL and upside down

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


On Sat, 2008-03-15 at 15:51 +0000, Peter Hull wrote:
> If you lock the OpenGL back-buffer, it currently reads the pixels and
> then reverses the order of the rows (because OpenGL bitmaps start from
> the bottom up and Allegro start from the top down). When you unlock,
> the opposite process occurs. This reversing is done by a load of
> memcpy-ing.
> 
> Would it be possible to avoid this by returning a locked region with
> data pointing to the last row of the region but with a negative pitch?
> 

I tried doing just that at first, but it did not work. Either because I
did it wrong, or because my version of the Nvidia drivers is broken and
supports only positive pitch.

But, it's not a big issue, since usually you will always prefer FBOs
over the memory locking.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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