TextureEnvMode Enum [fixed]
Posted Monday, 7 April, 2008 - 07:49 by teichgraf in
I am missing the GL_REPLACE value in the TextureEnvMode enum. TextureEnvMode.ReplaceExt = ((int)0X8062) has not the right value for GL_REPLACE:
#define GL_REPLACE 0x1E01
At the moment I use TextureEnvModeCombine.Replace, which has the right value (0x1E01).
GL.TexEnv(TextureEnvTarget.TextureEnv, TextureEnvParameter.TextureEnvMode, (float)TextureEnvModeCombine.Replace);
Is this intented?
Passing a value from the TextureEnvMode enum would make more sense to me, if TextureEnvParameter.TextureEnvMode is used in GL.TexEnv.
Or what did I mistake here?




Comments
Apr 07
19:55:32Re: TextureEnvMode Enum
posted by InertiaConfirmed, TextureEnvMode.ReplaceExt and TextureEnvModeCombine.Replace should both be 0x1e01. The problem could be that they're considered to be different by the generator (ext and core token). Thanks for pointing that out :)
Apr 08
07:04:36Re: TextureEnvMode Enum
posted by teichgrafWhy is the value named TextureEnvMode.ReplaceExt and not just TextureEnvMode.Replace, like in the OpenGL spec.?
Apr 08
08:58:00Re: TextureEnvMode Enum
posted by the FiddlerWhich specs?
MODULATE = 0x2100
DECAL = 0x2101
use GetPName BLEND
use EXT_texture REPLACE_EXT
use AccumOp ADD
use SGIX_texture_add_env TEXTURE_ENV_BIAS_SGIX
and:
[snip]
REPLACE_EXT = 0x8062
The only reference to REPLACE comes from StencilOp (which contains the correct value, 0x1E01). Yep, the specs are quite buggy :)
I'll fix this by hand, but it might be a good idea to log a bug at the khronos bugzilla.
Apr 08
09:25:28Re: TextureEnvMode Enum
posted by teichgrafOK, my fault. With specs I meant the ManPage for gltexenv.
Apr 08
13:30:00Re: TextureEnvMode Enum
posted by InertiaFrom http://opengl.org/registry/specs/EXT/texture.txt
Accepted by the parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnvfi when the parameter value is GL_TEXTURE_ENV_MODE
REPLACE_EXT 0x8062
From http://opengl.org/registry/specs/ARB/texture_env_combine.txt
Accepted by the parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the parameter value is COMBINE_RGB_ARB or COMBINE_ALPHA_ARB
REPLACE
---
I found a sample that it should be 0x1e01 yesterday. Does this refer to the EXT_texture which was promoted to core in 1.2, or the stencil token? *confused*
Apr 11
18:19:32Re: TextureEnvMode Enum
posted by the FiddlerFixed.