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;
}
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:
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:
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:
EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
{
- //TODO
- (void)dpy;
- (void)surface;
- (void)attribute;
+ // Right now we don't do anything when using host GPU.
+ // This is purely just to pass the data through
+ // without issuing a warning. We may benefit from validating the
+ // display and surface for debug purposes.
+ // TODO: Find cases where we actually need to do something.
+ VALIDATE_DISPLAY_INIT(dpy, EGL_FALSE);
+ VALIDATE_SURFACE_RETURN(surface, EGL_FALSE);
+ if (surface == EGL_NO_SURFACE) {
+ setErrorReturn(EGL_BAD_SURFACE, EGL_FALSE);
+ }
+
(void)value;
- ALOGW("%s not implemented", __FUNCTION__);
- return 0;
+
+ switch (attribute) {
+ case EGL_MIPMAP_LEVEL:
+ case EGL_MULTISAMPLE_RESOLVE:
+ case EGL_SWAP_BEHAVIOR:
+ return true;
+ break;
+ default:
+ ALOGW("%s: attr=0x%x not implemented", __FUNCTION__, attribute);
+ }
+ return false;
}
EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface eglSurface, EGLint buffer)