1 /**************************************************************************
3 * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * TUNGSTEN GRAPHICS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
21 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 **************************************************************************/
26 #include "main/mtypes.h"
27 #include "main/context.h"
28 #include "main/imports.h"
32 extern const GLubyte * GLAPIENTRY _es_GetString(GLenum name);
36 compute_es_version(void)
38 static const char es_1_0[] = "OpenGL ES-CM 1.0";
39 static const char es_1_1[] = "OpenGL ES-CM 1.1";
47 * Note: a more dynamic solution would be query the underlying GL
48 * and translate extension names...
51 extension_string(void)
55 "GL_OES_byte_coordinates "
57 "GL_OES_single_precision "
60 /* 1.1 required extensions */
62 "GL_OES_compressed_paletted_texture "
63 "GL_OES_point_size_array "
64 "GL_OES_point_sprite "
66 /* 1.1 optional extensions */
67 "GL_OES_draw_texture "
69 /* 1.1 deprecated extensions */
70 "GL_OES_query_matrix "
72 /* Newer extensions */
73 "GL_OES_blend_equation_separate "
74 "GL_OES_blend_func_separate "
75 "GL_OES_blend_subtract "
78 "GL_OES_element_index_uint "
79 "GL_OES_fbo_render_mipmap "
80 "GL_OES_framebuffer_object "
86 "GL_OES_texture_cube_map "
87 "GL_OES_texture_env_crossbar "
88 "GL_OES_texture_mirrored_repeat "
89 "GL_EXT_texture_filter_anisotropic "
94 const GLubyte * GLAPIENTRY
95 _es_GetString(GLenum name)
99 return (const GLubyte *) compute_es_version();
101 return (const GLubyte *) extension_string();
103 return _mesa_GetString(name);
109 _mesa_initialize_context_extra(GLcontext *ctx)
111 /* FEATURE_es2_glsl is on */
112 ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
113 ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;