diff --git a/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.cpp b/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.cpp index f9e95ec97..8541b3dae 100644 --- a/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.cpp +++ b/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.cpp @@ -57,7 +57,7 @@ int GL2Decoder::initGL(get_proc_func_t getProcFunc, void *getProcFuncData) set_glDrawElementsOffset(s_glDrawElementsOffset); set_glDrawElementsData(s_glDrawElementsData); - + set_glShaderString(s_glShaderString); return 0; } @@ -108,3 +108,8 @@ void GL2Decoder::s_glDrawElementsOffset(void *self, GLenum mode, GLsizei count, ctx->glDrawElements(mode, count, type, (void *)offset); } +void GL2Decoder::s_glShaderString(void *self, GLuint shader, GLstr string, GLsizei len) +{ + GL2Decoder *ctx = (GL2Decoder *)self; + ctx->glShaderSource(shader, 1, &string, NULL); +} diff --git a/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.h b/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.h index fc496813c..970c08d2f 100644 --- a/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.h +++ b/tools/emulator/opengl/host/libs/GLESv2_dec/GL2Decoder.h @@ -30,8 +30,6 @@ private: static void s_glDrawElementsOffset(void *self, GLenum mode, GLsizei count, GLenum type, GLuint offset); static void s_glDrawElementsData(void *self, GLenum mode, GLsizei count, GLenum type, void * data, GLuint datalen); - - - + static void s_glShaderString(void *self, GLuint shader, GLstr string, GLsizei len); }; #endif diff --git a/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib b/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib index fd183b08f..bce9b5113 100644 --- a/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib +++ b/tools/emulator/opengl/system/GLESv2_enc/gl2.attrib @@ -538,3 +538,8 @@ glGetCompressedTextureFormats dir formats out len formats (count * sizeof(GLint)) flag custom_decoder + +#GL_ENTRY(void, glShaderString, GLuint shader, GLchar *string, GLsizei len) +glShaderString + len string len + flag custom_decoder diff --git a/tools/emulator/opengl/system/GLESv2_enc/gl2.in b/tools/emulator/opengl/system/GLESv2_enc/gl2.in index 1616c536e..ad236632c 100644 --- a/tools/emulator/opengl/system/GLESv2_enc/gl2.in +++ b/tools/emulator/opengl/system/GLESv2_enc/gl2.in @@ -211,5 +211,6 @@ GL_ENTRY(void, glVertexAttribPointerOffset, GLuint indx, GLint size, GLenum type GL_ENTRY(void, glDrawElementsOffset, GLenum mode, GLsizei count, GLenum type, GLuint offset) GL_ENTRY(void, glDrawElementsData, GLenum mode, GLsizei count, GLenum type, void *data, GLuint datalen) GL_ENTRY(void, glGetCompressedTextureFormats, int count, GLint *formats) +GL_ENTRY(void, glShaderString, GLuint shader, GLstr string, GLsizei len)