glGetString(GL_SHADING_LANGUAGE_VERSION) return NULL

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
crtapps
Gnoblar
Posts: 2
Joined: Thu Jul 04, 2013 2:41 am

glGetString(GL_SHADING_LANGUAGE_VERSION) return NULL

Post by crtapps » Thu Jul 04, 2013 3:05 am

Hi all,

I had built ogre_src_v1-9-0RC1 and the sample of OgreJNI for Android successfully, the OgreJNI has a good run on the Samsung Galaxy S4 I9500 device. but as I installed it to the Android Emulator (ABI is armeabi-v7a, Target is Android 4.2.2, Use Host GPU, GPU is nVidia GTX 550 Ti), the OgreJNI sample crashed at OgreGLES2RenderSystem.cpp, code "const char* shadingLangVersion = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);", because the glGetString(GL_SHADING_LANGUAGE_VERSION); always return NULL. According to the documents of google, Android Emulator support OpenGL ES 2.0 since target 4.0.2 and higher.

Does anyone known how to solve it? Is Ogre able to running at Android Emulator?

Sorry for my English, thx.
0 x

crtapps
Gnoblar
Posts: 2
Joined: Thu Jul 04, 2013 2:41 am

Re: glGetString(GL_SHADING_LANGUAGE_VERSION) return NULL

Post by crtapps » Thu Jul 04, 2013 6:21 am

I have solved it.

If the glGetString(GL_SHADING_LANGUAGE_VERSION) return NULL on Android emulator, just simply ignore this checking, and hard code the shadingLangVersion variable to this: "OpenGL ES GLSL ES 1.00 build 1.10@2209507" :mrgreen:
0 x

Post Reply