PDA

View Full Version : exact positioning of an openGl object



Alphaman
08-13-2003, 12:10 AM
Hello,

please spread some wisdom reg. 'exact positioning of an openGl object'. I'm using C++ with Qt 3.2.

I've got some trouble with positioning of some openGl object, a bitmap representing a color gradient, I'd like to

have it positioned in the upper left corner in an openGl window. The bitmap should stay in a fixed position to the

corner even if the window size is changed.

TIA

Alphaman

mikael_aronsson
08-13-2003, 12:21 AM
Hi !

You switch to orthographic projection when you want to display it, if you look in the FAQ on this website there is an example of how to setup a projection that maps to screen pixels, you load the bitmap as texture, put it on a quad and render the quad where you want it.

The rest is rendered as usual and will have no effect at all on the quad, even though you might want to render the quad last and turn of depth testing when you render it so it doesn't get hidden behind something else.

I hope that helps

Mikael