Skip to main content
gamedev.net
🔒 Locked

ObjectSelection in iPhone

Started by sapdev Jun 13, 2009 at 2:05 AM 1 replies 900+ views
Original Post
sapdev
sapdev
Hi, greetings to all. My development platform is iPhone and I am kind of new in the field of OpenGL. I am trying to select which the user touches. I am using this technique. http://gpwiki.org/index.php/OpenGL_Selection_Using_Unique_Color_IDs Everything is fine (theoretically). But How can I render only in the color buffer. Any help regarding this will be highly appreciated.
------------------------------------------------------------------------------------------------------------------------------------------sapdev"A Ship is always safe at the shore - but that is NOT what it is built for" - Albert Einsteinhttp://saptarshi.devnath.googlepages.com/
Pilo
Pilo
Hi!

By "But How can I render only in the color buffer." I think you mean how to not write in the depth buffer? it's easy:

glDepthMask(GL_FALSE);


don't forget to enable it again when you need it glDepthMask(GL_TRUE)
sapdev
sapdev
Yeap . . . as there are 2 bufers only.

Thanks,

------------------------------------------------------------------------------------------------------------------------------------------sapdev"A Ship is always safe at the shore - but that is NOT what it is built for" - Albert Einsteinhttp://saptarshi.devnath.googlepages.com/

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.