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 const GLubyte * GLAPIENTRY _es_GetString(GLenum name);
36 compute_es_version(void)
38 static const char es_2_0[] = "OpenGL ES 2.0";
44 * Note: a more dynamic solution would be query the underlying GL
45 * and translate extension names...
48 extension_string(void)
52 "GL_OES_single_precision "
54 /* Requred extensions */
55 "GL_OES_compressed_paletted_texture "
57 /* Normal extensions */
60 "GL_OES_depth_texture "
61 "GL_OES_element_index_uint "
62 "GL_OES_fbo_render_mipmap "
64 "GL_OES_packed_depth_stencil "
66 "GL_OES_standard_derivatives "
71 "GL_OES_texture_npot "
72 "GL_EXT_texture_filter_anisotropic "
73 "GL_EXT_texture_type_2_10_10_10_REV "
74 "GL_OES_depth_texture "
75 "GL_OES_standard_derivatives "
80 const GLubyte * GLAPIENTRY
81 _es_GetString(GLenum name)
85 return (const GLubyte *) compute_es_version();
86 case GL_SHADING_LANGUAGE_VERSION:
87 return (const GLubyte *) "OpenGL ES GLSL ES 1.0.16";
89 return (const GLubyte *) extension_string();
91 return _mesa_GetString(name);
97 _mesa_initialize_context_extra(GLcontext *ctx)
99 ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
100 ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;
102 ctx->Point.PointSprite = GL_TRUE; /* always on for ES 2.x */