TextureEnvMode Enum [fixed]

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

Re: TextureEnvMode Enum
posted by Inertia

Confirmed, 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 :)

Re: TextureEnvMode Enum
posted by teichgraf

Why is the value named TextureEnvMode.ReplaceExt and not just TextureEnvMode.Replace, like in the OpenGL spec.?

Re: TextureEnvMode Enum
posted by the Fiddler

Which specs?

TextureEnvMode enum:
        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:
EXT_texture enum:
           [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.

Re: TextureEnvMode Enum
posted by teichgraf

OK, my fault. With specs I meant the ManPage for gltexenv.

Re: TextureEnvMode Enum
posted by Inertia

From 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*

Re: TextureEnvMode Enum
posted by the Fiddler

Fixed.

Who's online

There are currently 1 user and 3 guests online.

Online users

  • fukqueup