PDA

View Full Version : where i clicked on terrain



thasmin
05-02-2001, 08:21 AM
I'm having trouble finding out where I clicked on the terrain.

The rest of the post was inaccurate. I can still post code though if anyone would be so kind as to help me. Thanks.

[This message has been edited by thasmin (edited 05-03-2001).]

zed
05-02-2001, 04:32 PM
i have code on my site where u can drag objects around on top of a quad. it can be easily adapted to terrain.

thasmin
05-03-2001, 02:41 PM
Zed, I have a question about a certain line in your code. Right before you glReadPixels, you do:

realy = viewport[3] - (GLint) cursorposY - 1;

What is this for and how did you come to that equation? Thanks much, Zed.

[This message has been edited by thasmin (edited 05-03-2001).]

zed
05-03-2001, 09:56 PM
with windows (0,0) is at the top left of the screen. with opengl (0,0) is at the bottom left.