문제

im looking for any information about a builtin algorithm in opengl es to convert a 3d polygon in a triangle set. is there anything implemented like that in opengl es?

도움이 되었습니까?

해결책

Short answer: No, not as a part of OpenGL ES.

Polygon tessellation is provided as part of the GLU (OpenGL Utility) library, on a per platform, per-version, per-implementer basis as it is optional rather than core to OpenGL.

If you are working on iPhone, you should have a look at iphone-glu which claims to support polygon tessellation.

Here's a more general walkthrough of using tessellation in OpenGL with GLU (not ES though) which might help illuminate your path.

다른 팁

"It is difficult to do 3d triangulation". Well, that depends on what kind of triangulation you are trying to do. If you are trying, for example, to find a Delaunay triangulation, that is equivalent to finding a convex hull, which is a hard enough problem.

But you might not need something that fancy. If all you need is just any triangulation, that is simpler. But usually you need to keep track of hidden surfaces, which is another example of why they did not include this in the core API: there are too many different algorithms that might need to be used depending on the user's real requirements. They did not want to burden the resource limited mobile phone with supporting everything the developer might need, nor with a slow algorithm that would cover all bases.

Remember that when OpenGL-ES was developed, mobile phones were even more limited than now. The 16M that a G1 has was rare in those days. The CPU speed was only about 25Mhz, too.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top