diff --git a/tools/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp b/tools/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp index f696ea6ca..ba8bbe7be 100644 --- a/tools/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp +++ b/tools/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp @@ -778,7 +778,9 @@ GL_APICALL void GL_APIENTRY glGetAttachedShaders(GLuint program, GLsizei maxcou const GLuint globalProgramName = ctx->shareGroup()->getGlobalName(SHADER,program); SET_ERROR_IF(globalProgramName==0, GL_INVALID_VALUE); ctx->dispatcher().glGetAttachedShaders(globalProgramName,maxcount,count,shaders); - for(int i=0 ; i < *count ;i++){ + GLint numShaders=0; + ctx->dispatcher().glGetProgramiv(globalProgramName,GL_ATTACHED_SHADERS,&numShaders); + for(int i=0 ; i < maxcount && ishareGroup()->getLocalName(SHADER,shaders[i]); } } diff --git a/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib b/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib index a90eadf34..538c453ef 100644 --- a/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib +++ b/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib @@ -104,6 +104,7 @@ glGetAttachedShaders len shaders (maxcount*sizeof(GLuint)) dir shaders out dir count out + var_flag count nullAllowed len count (sizeof(GLsizei)) #int glGetAttribLocation(GLuint program, GLchar *name)