1
\$\begingroup\$

I created a small OpenGL renderer in C++ and I want to move to Android so I prepared eclipse with all suitable platforms and create a Native Activity project then add the NDK to the includes and successfully executed and run a sample which color the screen, once I imported the files from the C++ project (copy them to jni folder) and fixed the includes I found many GL declarations are not occurred for example "Function 'glDrawBuffer' could not be resolved", I opened the gl3.h file and discovered that they are not occurred in that file, in my desktop version I use glew library and the file glew.h contains all those definitions so I tried to copy the definition from glew.h

GLAPI void GLAPIENTRY glDrawBuffer (GLenum mode);

to gl3.h

GL_APICALL void GL_APIENTRY glDrawBuffer (GLenum mode);

but still have the same error. is these functions and constants are not occurred in the ES version of OpenGL or I need to update something? I have NDK r 15, SDK 22, Eclipse neo and GCC compiler with Android Builder.

Edit:

I found this definition in the same file

GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);

I think it is the same function but different number of arguments so I can guess there are many differences between OpenGL and the ES3 so the is same code will not run and must be changed?

also is there a place where I can find the equivalent functions or constants?

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Yes, OpenGL and OpenGL ES are different specifications, and there are often functions is desktop GL that are not available in ES. \$\endgroup\$ Jul 19, 2017 at 13:14

1 Answer 1

-1
\$\begingroup\$

I found this site Docs GL very helpful for documenting OpenGL functions and its support in all GL versions

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Hi Mohammed - would you consider revisiting this answer to expand on the content? Right now it relies wholly on the link, which means if the URL ever changes or becomes unreachable then a user won't be able to learn the information you're trying to point them to. Including a summary of a few of the highlights / most relevant points helps keep your answer useful, even if the link fails. \$\endgroup\$
    – DMGregory
    May 16, 2018 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .