我可以在 Android NDK 中使用 glu [英] Can I use glu with Android NDK

查看:20
本文介绍了我可以在 Android NDK 中使用 glu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法在我的 Android NDK 项目中包含 glu.h.

我正在尝试将现有的 C++ 代码移植到 NDK,它在一些地方使用了 glu(特别是 gluErrorString).

OpenGLES没有glu吗?

有我可以使用的端口吗?

如果不是,我可能会删除对 gluPerspective 等内容的调用,但是对于 gluErrorString 我该怎么办?

解决方案

OpenGL ES 没有glu 吗?

不,它没有.看看这个:Platform OpenGL Includes collection.在Android下只有以下标题:

OpenGL ES 1.1:

#include <GLES/gl.h>#include <GLES/gext.h>

OpenGL ES 2.0:

#include <GLES2/gl2.h>#include <GLES2/gl2ext.h>

<小时><块引用>

有我可以使用的端口吗?

是的,Android 有部分 GLU 移植版 - GLU ES(它支持gluErrorStringgluPerspective 和许多其他函数):

<块引用>

GLU 1.3 部分端口(仅限 libutil 和 libtess 组件)用于OpenGL ES 1.x(CM - 通用配置文件)及更高版本.

此端口支持:

  • Quadric:gluNewQuadric()、gluDeleteQuadric()、gluQuadricCallback()、gluQuadricNormals()、gluQuadricTexture()、gluQuadricOrientation()、gluQuadricDrawStyle()、gluCylinder()、gluDisk()、gluPartialDisk()、胶球().
  • 注册表:gluGetString()、gluCheckExtension()、gluErrorString().
  • 投影矩阵操作:gluOrtho2D(),gluPerspective()、gluLookAt()、gluProject()、gluUnProject()、gluUnProject4()、gluPickMatrix().2D Mipmap:gluScaleImage(),gluBuild2DMipmapLevels()、gluBuild2DMipmaps().
  • 镶嵌:gluBeginPolygon()、gluDeleteTess()、gluEndPolygon()、gluGetTessProperty()、gluNewTess()、gluNextContour()、gluTessBeginContour()、gluTessBeginPolygon()、gluTessCallback()、gluTessEndContour()、gluTessEndPolygon()、gluTessNormal()、gluTessProperty()、gluTessVertex().

I can't seem to include glu.h in my Android NDK project.

I'm trying to port existing C++ code to NDK, and it uses glu in a few places (notably gluErrorString).

Does OpenGLES not have glu?

Is there a port I can use?

If not I can probably remove the calls to things like gluPerspective and so on, but what do I do about gluErrorString?

解决方案

Does OpenGL ES not have glu?

No, it doesn't. Look at this: Platform OpenGL Includes collection. Under Android there are only the following headers:

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?

Yes, there is a partial port of GLU for Android - GLU ES (it supports gluErrorString, gluPerspective and numerous other functions):

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 NDK 中使用 glu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆