switch (api) {
case ST_API_OPENGL:
+#if FEATURE_GL || FEATURE_ES1 || FEATURE_ES2
#if _EGL_EXTERNAL_GL
stapi = egl_st_load_gl();
#else
stapi = st_gl_api_create();
+#endif
#endif
break;
case ST_API_OPENVG:
{
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+#if FEATURE_GL
if (ctx->API == API_OPENGL && !ctx->Extensions.ARB_ES2_compatibility) {
struct gl_framebuffer *fb = ctx->DrawBuffer;
fb->_Status = 0;
}
}
+#endif
}
/* setup the API dispatch tables */
switch (ctx->API) {
+#if FEATURE_GL || FEATURE_ES2
case API_OPENGL:
case API_OPENGL_CORE:
case API_OPENGLES2:
ctx->Exec = _mesa_create_exec_table(ctx);
break;
+#endif
+#if FEATURE_ES1
case API_OPENGLES:
ctx->Exec = _mesa_create_exec_table_es1();
break;
+#endif
default:
_mesa_problem(ctx, "unknown or unsupported API");
break;
}
break;
+#if FEATURE_ES1
case GL_TEXTURE_GEN_STR_OES:
/* disable S, T, and R at the same time */
{
}
}
break;
+#endif
/* client-side state */
case GL_VERTEX_ARRAY:
}
}
return GL_FALSE;
-
+#if FEATURE_ES1
case GL_TEXTURE_GEN_STR_OES:
{
const struct gl_texture_unit *texUnit = get_texcoord_unit(ctx);
? GL_TRUE : GL_FALSE;
}
}
+#endif
/* client-side state */
case GL_VERTEX_ARRAY:
goto invalid_enum_error;
CHECK_EXTENSION(EXT_secondary_color);
return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled != 0);
+#if FEATURE_ES
case GL_POINT_SIZE_ARRAY_OES:
if (ctx->API != API_OPENGLES)
goto invalid_enum_error;
return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled != 0);
+#endif
/* GL_ARB_texture_cube_map */
case GL_TEXTURE_CUBE_MAP_ARB:
}
}
+#if FEATURE_ES1
void GLAPIENTRY
_mesa_GetFixedv(GLenum pname, GLfixed *params)
{
break;
}
}
+#endif
case GL_ETC1_RGB8_OES:
return _mesa_is_gles(ctx)
&& ctx->Extensions.OES_compressed_ETC1_RGB8_texture;
+#if FEATURE_ES
case GL_PALETTE4_RGB8_OES:
case GL_PALETTE4_RGBA8_OES:
case GL_PALETTE4_R5_G6_B5_OES:
case GL_PALETTE8_RGBA4_OES:
case GL_PALETTE8_RGB5_A1_OES:
return ctx->API == API_OPENGLES;
+#endif
default:
return GL_FALSE;
}
validate_program(ctx, program);
}
+#ifdef FEATURE_ES2
+
void GLAPIENTRY
_mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
GLint* range, GLint* precision)
_mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
}
+#endif /* FEATURE_ES2 */
+
void GLAPIENTRY
_mesa_ProgramParameteriARB(GLuint program, GLenum pname, GLint value)
}
}
+#if FEATURE_ES1
if (ctx->API == API_OPENGLES) {
if (formats) {
formats[n++] = GL_PALETTE4_RGB8_OES;
n += 10;
}
}
+#endif
return n;
}
}
switch (internalFormat) {
+#if FEATURE_ES
case GL_PALETTE4_RGB8_OES:
case GL_PALETTE4_RGBA8_OES:
case GL_PALETTE4_R5_G6_B5_OES:
*/
level = -level;
break;
+#endif
default:
choose_format = GL_NONE;
format, type, width, height, depth, border);
}
+#if FEATURE_ES
/* Here we convert a cpal compressed image into a regular glTexImage2D
* call by decompressing the texture. If we really want to support cpal
* textures in any driver this would have to be changed.
*/
- if (ctx->API == API_OPENGLES && compressed && !error && dims == 2) {
+ if (compressed && !error && dims == 2) {
switch (internalFormat) {
case GL_PALETTE4_RGB8_OES:
case GL_PALETTE4_RGBA8_OES:
return;
}
}
+#endif
if (_mesa_is_proxy_texture(target)) {
/* Proxy texture: just clear or set state depending on error checking */