Click Return Value

Click Return Value

Post by Chris Morri » Thu, 20 Feb 1997 04:00:00



I've been building my own rendering engine from scratch in Delphi and am
looking to port my app over to OpenGL in the future. A crucial part of my
app is allowing a user to click on a rendered object and the engine
calculates the 3D world coordinate point of where they clicked. I assume
OpenGL can do this. The question is how?
--

====================================
There are 3 kinds of people
Those who can count, and those who can't

 
 
 

Click Return Value

Post by Steven Barkdul » Fri, 21 Feb 1997 04:00:00


OpenGL implements a mechanism refered to as "selection" or "picking".
see chap. 12 in the red book. in essence, you place the render into
selection mode, pseudo-draw your scene (opengl doesnt actually write to
the frame buffer when in selection mode), while drawing the scene,
opengl builds a selection buffer with information identifying which
primitives were selected. this selection buffer is available to the
application.


> I've been building my own rendering engine from scratch in Delphi and am
> looking to port my app over to OpenGL in the future. A crucial part of my
> app is allowing a user to click on a rendered object and the engine
> calculates the 3D world coordinate point of where they clicked. I assume
> OpenGL can do this. The question is how?
> --

> ====================================
> There are 3 kinds of people
> Those who can count, and those who can't

--
+++++++++++++++++++++++++++++++
+ Steven Barkdull             +

+ Engineering Animation, Inc. +
+++++++++++++++++++++++++++++++

 
 
 

Click Return Value

Post by JB Wes » Fri, 21 Feb 1997 04:00:00


There's a much simpler way. If you just want a world coordinate
back, read the Z-buffer and use gluUnProject. Don't need
to re-render the scene at all. I use this method for a
"lazy evaluation" where I get a constant world coordinate
readout from mouse motion over the scene.


> OpenGL implements a mechanism refered to as "selection" or "picking".
> see chap. 12 in the red book. in essence, you place the render into
> selection mode, pseudo-draw your scene (opengl doesnt actually write to
> the frame buffer when in selection mode), while drawing the scene,
> opengl builds a selection buffer with information identifying which
> primitives were selected. this selection buffer is available to the
> application.


> > I've been building my own rendering engine from scratch in Delphi and am
> > looking to port my app over to OpenGL in the future. A crucial part of my
> > app is allowing a user to click on a rendered object and the engine
> > calculates the 3D world coordinate point of where they clicked. I assume
> > OpenGL can do this. The question is how?
> > --

> > ====================================
> > There are 3 kinds of people
> > Those who can count, and those who can't

> --
> +++++++++++++++++++++++++++++++
> + Steven Barkdull             +

> + Engineering Animation, Inc. +
> +++++++++++++++++++++++++++++++

--

.sig
 
 
 

1. Changing screens and click buttons uses and doesn't return memory

I have a application that when clicking buttons and opening screens the memory (viewed via task manager in Win NT4) goes up.  When I return to the main screen the memory doesn't return to what it was before clicking or changing screens.  I have used memory sleuth from turbopower but it doesn't report any changes!  Does anyone know what may be happening.  I'm using Delphi 4.  This application is a long term run app so several months maybe required and increases in memory usuage is a concern.

2. 3-D Studio

3. POV-Ray 3.1 : Returning a value!

4. ---++++*****WANTED: Everything...*****++++---

5. returned from-0 value-2 days in-help!

6. M2 and MAX????

7. what gversion values can an O2 return?

8. max return value ...

9. Odd return values from LScript Control Objects.

10. Return-Value of function

11. Values returned from glReadPixels slightly off.

12. Using Z value returned by gluProject