简体   繁体   English

glPushName()和GL_TRIANGLE_STRIP

[英]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. 但是我不能在glBegin / glEnd之间使用glPushName(),所以我只能将整个条带保存在名称缓冲区中。 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? 我知道通过创建GL_TRIANGLE对象而不是三角形条带可以解决我的问题,但这不会慢得多吗?

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). 不推荐使用OpenGL的选择模式,您应该使用基于CPU的光线拾取算法(如果您真的关心选择性能)。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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