Re: Identifying just the one triangle that the user clicked on?
by "jbwest" <jbwest@[EMAIL PROTECTED]
>
Aug 20, 2008 at 08:05 AM
"Flark" <flarkino@[EMAIL PROTECTED]
> wrote in message
news:51ddd2d5-edcc-45bd-a1e0-4fa3a9519ec7@[EMAIL PROTECTED]
Aug 18, 10:56 am, Wolfgang Draxinger <wdraxin...@[EMAIL PROTECTED]
>
wrote:
> Doing it with OpenGL:
>
> Assuming you can draw with 8 bits per channel there are 2^24
> values you can address using the colour buffer. Just give each
> triangle a colour that maps to a number, to a glReadPixels on
> the mouse position and you're done.
Does this require drawing to the screen?
Or can I draw to the double-buffer and use
glReadPixels to read from that, and simply
not call glutSwapBuffers()?
Thanks.
Yes, as long as the window isn't obscured. So now you are looking at a
blank
window.
Or use a P-buffer, which is entirely off-screen.
jbw