Question

I have following commands:

    // 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 );

The program is in native C++ for Android 4, using only NativeActivity. So, project has no /src and java classes.

I put the information to NDK OGLES 2.0 about the version running as EGL_OPENGL_ES2_BIT, and Android.mk was also setup to -lGLESv2. In the file is also included:

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

And also AndroidManifest was informed that it runs OGLES 2.0.

When asked to run, the program gives the following message:

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

For some reason these commands that belong to OGLES 2 are not visible. Any suggestion why this?

All comments are highly appreciated.

Was it helpful?

Solution

esLoadProgram and esGenCube are not a part of OpenGL ES or EGL. They are just a helper functions (probably from http://code.google.com/p/opengles-book-samples/)

PS. I would not suggest to mix also GLES and GLES2 headers. If you want GL ES 2.0, then include only from <GLES2/...> (not <GLES/...>)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top