android - NDK-build GLuint does not name a type when trying to compile -


so apparently im not sure how include open gl in sdl application

i have:

if _android_ #include <gles2/gl2.h> #include <gles2/glext.h> 

but when use gluint

gluint not name type

my android.mk includes

local_ldlibs := -lglesv1_cm -lglesv2 -llog  

and building android platform 10 (** **)

app_platform := android-10  app_abi := armeabi-v7a armeabi x86 

so not sure doing wrong

(added rest of file having problems:)

#pragma once #include <stdlib.h> #include <iostream> #include <random> #include <cassert>  #include "vec2.h" #include "vec3.h" #include "vec4.h" #include "mat4.h" #include "transformations.h"  #if defined(_msc_ver) #include <windows.h> #include <glew.h> #include <gl\gl.h> #include <gl\glu.h> #include <sdl.h> #include <sdl_ttf.h> #include <sdl_image.h> #include <sdl_mixer.h> #include <sdl_opengl.h> #include <stdio.h> #include <string> #endif  #if __apple__ #include <sdl2/sdl.h> #include <sdl2_image/sdl_image.h> #include <sdl2_ttf/sdl_ttf.h> #include <sdl2_mixer/sdl_mixer.h> #endif  #if __android__ #include <sdl.h> #include <sdl_image.h> #include <sdl_ttf.h> #include <sdl_mixer.h> #endif  // vec2 *screen; /*const*/ // int sw; /*const*/ // int sh;  #if __iphoneos__ || __android__ #define mobile 1 #endif  #if __macosx__ || __windows__ || __linux__ #define pc 1 #endif  #if __iphoneos__ #include <opengles/es2/gl.h> #include <opengles/es2/glext.h> inline void glbindvertexarray(gluint id1) {    glbindvertexarrayoes(id1); } inline void glgenvertexarrays(glsizei n, gluint *ids) {    glgenvertexarraysoes(n, ids); } inline void gldeletevertexarrays(glsizei n, const gluint *ids) {    gldeletevertexarraysoes(n, ids); } #elif target_os_mac #include <opengl/gl.h> #include <opengl/glext.h> inline void glbindvertexarray(gluint id1) {    glbindvertexarrayapple(id1); } inline void glgenvertexarrays(glsizei n, gluint *ids) {    glgenvertexarraysapple(n, ids); } inline void gldeletevertexarrays(glsizei n, const gluint *ids) {    gldeletevertexarraysapple(n, ids); }  #elif __android__ #include <gles3/gl3.h> #include <gles3/gl3ext.h>     inline void glbindvertexarray(gluint id1) {         glbindvertexarrayoes(id1);     }     inline void glgenvertexarrays(glsizei n, gluint *ids) {         glgenvertexarraysoes(n, ids);     }     inline void gldeletevertexarrays(glsizei n, const gluint *ids) {         gldeletevertexarraysoes(n, ids);     } #endif // android   inline string get_path(string filename) {    char *base = sdl_getbasepath();    string path(base + filename);    sdl_free(base);    //cout << "getting path " << path << endl;    return path; }  using namespace std; 

i solved using

app_stl := c++_static 

instead of

#app_stl := gnustl_static  

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -