简体   繁体   中英

glPushName() and GL_TRIANGLE_STRIP

I am trying to implement selecting a node in a terrain (represented by triangle strips). However I cannot use glPushName() between glBegin/glEnd, so I can only save the whole strip in a name buffer. Any other ideas how could I select a specific node/triangle with the mouse?

I know that by creating GL_TRIANGLE objects instead of the triangle strip would solve my problem, but wouldn't that be much much slower?

Thanks in advance

OpenGL's selection mode has been deprecated, you should use a CPU-based ray picking algorithm instead (if you really care about picking performance).

http://www.opengl.org/resources/faq/technical/selection.htm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM