开发者

Getting the coordinates of GlutSolid*

I was wondering, I have an algorithm of mine that I want to test with a high poly-count model. (I'm using a hard coded cube and surface atm). I know you can draw objects with the GluSolid* commands.开发者_JAVA百科

But the problem is, for my alogrithm I need access to the coordinates of the triangles the object consists of. Is there an easy way to access these, or is that not possible?


I think there's not really an easy way to obtain these coordinates as they are just sent to the GL when calling these functions (you might use transform feedback, but that is definitely too cumbersome for your purpose). But these primitives are actually quite simple. You can quite easily generate a sphere or cylinder mesh yourself. Or write a small function for reading a common 3d model format (OBJ is quite common and easy to read), so you can search the web for models or create test models with your favourite modeling software.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜