gpt4 book ai didi

安卓 native OGLES2 : esLoadProgram not declared

转载 作者:行者123 更新时间:2023-11-28 08:09:31 25 4
gpt4 key购买 nike

我有以下命令:

    // Load the shaders and get a linked program object
userData->programObject = esLoadProgram( vShaderStr, fShaderStr );
...
// Generate the vertex data
userData->numIndices = esGenCube( 1.0, &userData->vertices,NULL, NULL, &userData->indices );

该程序使用适用于 Android 4 的原生 C++,仅使用 NativeActivity。因此,项目没有/src 和 java 类。

我将有关作为 EGL_OPENGL_ES2_BIT 运行的版本的信息放入 NDK OGLES 2.0,Android.mk 也设置为 -lGLESv2。文件中还包括:

#include <GLES/gl.h>
#include <GLES/glext.h>
#include <EGL/egl.h>
#include <GLES2/gl2.h>

AndroidManifest 也被告知它运行 OGLES 2.0。

当要求运行时,程序给出以下消息:

'esLoadProgram' was not declared in this scope
'esGenCube' was not declared in this scope

由于某些原因,这些属于 OGLES 2 的命令不可见。有什么建议吗?

非常感谢所有评论。

最佳答案

esLoadProgramesGenCube不是 OpenGL ES 或 EGL 的一部分。它们只是辅助函数(可能来自 http://code.google.com/p/opengles-book-samples/ )

附言。我不建议混合使用 GLES 和 GLES2 header 。如果你想要 GL ES 2.0,那么只包含 <GLES2/...> (不是 <GLES/...>)

关于安卓 native OGLES2 : esLoadProgram not declared,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9487291/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com