Clean up minor opengl errors/warnings.
There are always disconcerting messages printed to logcat
whenever developing apps on the emulator.
glUtilsParamSize and other functions
often fail with "unknow param 0x00..."
These are missing GLenums and types that for
some reason are not in glUtils.cpp
in OpenglCodecCommon.
There also has been a long-standing warning
that eglSurfaceAttrib is not implemented.
It seems we don't need to implement that to get things done,
so we will give a no-op implementation that suppresses
the warning.
Change-Id: I1b672cedf1672fc09cfe6a832f908e1496cc7a46
diff --git a/shared/OpenglCodecCommon/GLClientState.cpp b/shared/OpenglCodecCommon/GLClientState.cpp
index 0826a14..a0c4fc1 100644
--- a/shared/OpenglCodecCommon/GLClientState.cpp
+++ b/shared/OpenglCodecCommon/GLClientState.cpp
@@ -92,7 +92,7 @@
m_states[location].stride = stride;
m_states[location].data = (void*)data;
m_states[location].bufferObject = m_currentArrayVbo;
- m_states[location].elementSize = glSizeof(type) * size;
+ m_states[location].elementSize = size ? (glSizeof(type) * size) : 0;
m_states[location].normalized = normalized;
}
diff --git a/shared/OpenglCodecCommon/glUtils.cpp b/shared/OpenglCodecCommon/glUtils.cpp
index 4b7fc89..eb4ba94 100644
--- a/shared/OpenglCodecCommon/glUtils.cpp
+++ b/shared/OpenglCodecCommon/glUtils.cpp
@@ -109,6 +109,7 @@
case GL_POINT_SIZE_MIN:
case GL_POINT_SIZE_MAX:
case GL_POINT_FADE_THRESHOLD_SIZE:
+ case GL_CULL_FACE:
case GL_CULL_FACE_MODE:
case GL_FRONT_FACE:
case GL_SHADE_MODEL:
@@ -126,6 +127,7 @@
case GL_ALPHA_TEST_FUNC:
case GL_ALPHA_TEST_REF:
case GL_ALPHA_TEST:
+ case GL_DITHER:
case GL_BLEND_DST:
case GL_BLEND_SRC:
case GL_BLEND:
@@ -187,6 +189,7 @@
case GL_SAMPLE_COVERAGE_INVERT:
case GL_SAMPLE_COVERAGE_VALUE:
case GL_SAMPLES:
+ case GL_MAX_SAMPLES_EXT:
case GL_STENCIL_BITS:
case GL_STENCIL_CLEAR_VALUE:
case GL_STENCIL_FUNC: