我似乎无法在我的 Android NDK 项目中包含 glu.h。
我正在尝试将现有的 C++ 代码移植到 NDK,它在一些地方使用了 glu(特别是 gluErrorString
)。
OpenGLES没有glu吗?
有我可以使用的端口吗?
如果不是,我可能会删除对 gluPerspective
等内容的调用,但是对于 gluErrorString
我该怎么办?
最佳答案
Does OpenGL ES not have glu?
不,它没有。看看这个:Platform OpenGL Includes collection .在Android下只有以下标题:
OpenGL ES 1.1:
#include <GLES/gl.h>
#include <GLES/glext.h>
OpenGL ES 2.0:
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
Is there a port I can use?
是的,有部分 GLU 移植到 Android - GLU ES (它支持gluErrorString
、gluPerspective
和许多其他功能):
GLU 1.3 partitial port (libutil and libtess components only) for OpenGL ES 1.x (CM - Common profile) and above.
This port supports:
- Quadrics: gluNewQuadric(), gluDeleteQuadric(), gluQuadricCallback(), gluQuadricNormals(), gluQuadricTexture(), gluQuadricOrientation(), gluQuadricDrawStyle(), gluCylinder(), gluDisk(), gluPartialDisk(), gluSphere().
- Registry: gluGetString(), gluCheckExtension(), gluErrorString().
- Projection matrix manipulation: gluOrtho2D(), gluPerspective(), gluLookAt(), gluProject(), gluUnProject(), gluUnProject4(), gluPickMatrix(). 2D Mipmaps: gluScaleImage(), gluBuild2DMipmapLevels(), gluBuild2DMipmaps().
- Tesselation: gluBeginPolygon(), gluDeleteTess(), gluEndPolygon(), gluGetTessProperty(), gluNewTess(), gluNextContour(), gluTessBeginContour(), gluTessBeginPolygon(), gluTessCallback(), gluTessEndContour(), gluTessEndPolygon(), gluTessNormal(), gluTessProperty(), gluTessVertex().
关于android - 我可以在 Android NDK 中使用 glu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7589563/