ARB_window_pos

C3e4dac0186a6a2f6b05d272fded2d6f
0
Asshen 101 Sep 17, 2003 at 09:40

Can anybody explain the use of ARB_window_pos to me.
If possible a code example :)

Thank you very much.
K

5 Replies

Please log in or register to post a reply.

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Sep 17, 2003 at 18:40

i think this extension let’s you specify a render position directly in window coordinates bypassing the modelview and projection matrix… i think clipping also gets disabled

you would use it like this

glWindowPos2fARB(x, y);

and then make a call to glBitmap or some other raster routine

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Sep 17, 2003 at 18:59

This might also help you.

C3e4dac0186a6a2f6b05d272fded2d6f
0
Asshen 101 Sep 17, 2003 at 20:04

Ok, I read through the spec very fast :)

Is it possible to use this extension to get the xyz coord from a xy window coord ?
Or vice-versa ?

Thanks.

F7a4a748ecf664f189bb704a660b3573
0
anubis 101 Sep 17, 2003 at 23:33

i don’t think so…

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Sep 18, 2003 at 17:11

For that, you need to choose what you want. If you want to get the xyz value of the pixel over which the mouse is, you need picking. If you just need to convert from window xy -> opengl xy then you just need to look at gluProject and gluUnProject.