diff options
author | Chia-I Wu <[email protected]> | 2009-11-24 10:28:27 +0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-01-04 14:15:15 -0700 |
commit | b80ec33f3559e9a14d08f84c8e369a0dc81b46d7 (patch) | |
tree | d40f903535a9a8bc58592f8c5e292978dadd79b6 /src/mesa/es/main/specials_es1.c | |
parent | 3a4d0811b43295519d771fa192bd3d28bd5312d5 (diff) |
mesa/es: Fix GL_OES_texture_cube_map support.
Unlike in OpenGL, GL_OES_texture_cube_map says that all coordinates are
changed the same time by the token GL_TEXTURE_GEN_STR_OES, and the
initial mode is GL_REFLECTION_MAP_OES.
Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/mesa/es/main/specials_es1.c')
-rw-r--r-- | src/mesa/es/main/specials_es1.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mesa/es/main/specials_es1.c b/src/mesa/es/main/specials_es1.c index 0ace2924b37..a4f14490f31 100644 --- a/src/mesa/es/main/specials_es1.c +++ b/src/mesa/es/main/specials_es1.c @@ -195,5 +195,19 @@ _es_GetString(GLenum name) void _mesa_initialize_context_extra(GLcontext *ctx) { - /* nothing here */ + GLuint i; + + /** + * GL_OES_texture_cube_map says + * "Initially all texture generation modes are set to REFLECTION_MAP_OES" + */ + for (i = 0; i < MAX_TEXTURE_UNITS; i++) { + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i]; + texUnit->GenS.Mode = GL_REFLECTION_MAP_NV; + texUnit->GenT.Mode = GL_REFLECTION_MAP_NV; + texUnit->GenR.Mode = GL_REFLECTION_MAP_NV; + texUnit->GenS._ModeBit = TEXGEN_REFLECTION_MAP_NV; + texUnit->GenT._ModeBit = TEXGEN_REFLECTION_MAP_NV; + texUnit->GenR._ModeBit = TEXGEN_REFLECTION_MAP_NV; + } } |