diff options
author | bohu <bohu@google.com> | 2014-10-17 13:54:59 -0700 |
---|---|---|
committer | Vince Harron <vharron@google.com> | 2014-10-29 19:15:48 +0000 |
commit | 57da2bfb0dba29677c9cc06442644bc7c720af94 (patch) | |
tree | 882c32b51f0778d6caeaeb63a8fbf1807a798fd1 /emulator/opengl/host | |
parent | ffe2a60cb0ac24d073fb46d50a9cedfd82da4a91 (diff) | |
download | sdk-57da2bfb0dba29677c9cc06442644bc7c720af94.zip sdk-57da2bfb0dba29677c9cc06442644bc7c720af94.tar.gz sdk-57da2bfb0dba29677c9cc06442644bc7c720af94.tar.bz2 |
Properly reset source code buffer
This commit clears m_src of ShaderParser in setSrc()
method before reading new shader source code so that
any previous source code won't be prefixed to new
shader source code.
Change-Id: Iacc98b32aea380d1e4503c37b86f5db55263e667
(cherry picked from commit ba8d8fef8f76d86f90f5cc7774e1e0f4fb507b86)
Diffstat (limited to 'emulator/opengl/host')
-rw-r--r-- | emulator/opengl/host/libs/Translator/GLES_V2/ShaderParser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/emulator/opengl/host/libs/Translator/GLES_V2/ShaderParser.cpp b/emulator/opengl/host/libs/Translator/GLES_V2/ShaderParser.cpp index 940538a..9bbedbf 100644 --- a/emulator/opengl/host/libs/Translator/GLES_V2/ShaderParser.cpp +++ b/emulator/opengl/host/libs/Translator/GLES_V2/ShaderParser.cpp @@ -36,6 +36,7 @@ ShaderParser::ShaderParser(GLenum type):ObjectData(SHADER_DATA), }; void ShaderParser::setSrc(const Version& ver,GLsizei count,const GLchar** strings,const GLint* length){ + m_src.clear(); for(int i = 0;i<count;i++){ m_src.append(strings[i]); } |