diff options
| author | bohu <bohu@google.com> | 2014-11-18 19:46:11 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-11-18 19:46:11 +0000 |
| commit | a794a0a4b8219d6d32344971946d04fa520ebe9e (patch) | |
| tree | bd7fe00102852a743ed4c1bf64515a85cbe6b270 /emulator | |
| parent | e7cdb6a357ee0036432c9c85b8baec6c5a1e9ce8 (diff) | |
| parent | 92ebbc674404fd90aba4df68216e1f103456c7fc (diff) | |
| download | sdk-a794a0a4b8219d6d32344971946d04fa520ebe9e.tar.gz sdk-a794a0a4b8219d6d32344971946d04fa520ebe9e.tar.bz2 sdk-a794a0a4b8219d6d32344971946d04fa520ebe9e.zip | |
Merge "handles glGetFloatv with GL_STENCIL_VALUE_MASK etc"
Diffstat (limited to 'emulator')
| -rw-r--r-- | emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp b/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp index a25efab7a..7f4cd4fc7 100644 --- a/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp +++ b/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp @@ -1004,6 +1004,20 @@ GL_APICALL void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params){ } break; + case GL_STENCIL_BACK_VALUE_MASK: + case GL_STENCIL_BACK_WRITEMASK: + case GL_STENCIL_VALUE_MASK: + case GL_STENCIL_WRITEMASK: + { + GLint myint = 0; + glGetIntegerv(pname, &myint); + // Two casts are used: since mask is unsigned integer, + // the first cast converts to unsigned integer; + // the second cast converts to float. + *params = (GLfloat)((GLuint)(myint)); + } + break; + default: ctx->dispatcher().glGetFloatv(pname,params); } |
