ctx->Extensions.EXT_secondary_color = true;
ctx->Extensions.EXT_separate_shader_objects = true;
ctx->Extensions.EXT_stencil_wrap = true;
- ctx->Extensions.EXT_texture_env_combine = true;
ctx->Extensions.EXT_texture_env_dot3 = true;
ctx->Extensions.EXT_texture_filter_anisotropic = true;
ctx->Extensions.EXT_texture_lod_bias = true;
ctx->Extensions.EXT_packed_depth_stencil = true;
ctx->Extensions.EXT_secondary_color = true;
ctx->Extensions.EXT_stencil_wrap = true;
- ctx->Extensions.EXT_texture_env_combine = true;
ctx->Extensions.EXT_texture_filter_anisotropic = true;
ctx->Extensions.EXT_texture_lod_bias = true;
ctx->Extensions.NV_blend_square = true;
ctx->Extensions.EXT_packed_depth_stencil = true;
ctx->Extensions.EXT_secondary_color = true;
ctx->Extensions.EXT_stencil_wrap = true;
- ctx->Extensions.EXT_texture_env_combine = true;
ctx->Extensions.EXT_texture_env_dot3 = true;
ctx->Extensions.EXT_texture_filter_anisotropic = true;
ctx->Extensions.EXT_texture_lod_bias = true;
ctx->Extensions.EXT_secondary_color = true;
ctx->Extensions.EXT_shadow_funcs = true;
ctx->Extensions.EXT_stencil_wrap = true;
- ctx->Extensions.EXT_texture_env_combine = true;
ctx->Extensions.EXT_texture_env_dot3 = true;
ctx->Extensions.EXT_texture_filter_anisotropic = true;
ctx->Extensions.EXT_texture_lod_bias = true;
ctx->Extensions.EXT_shadow_funcs = true;
ctx->Extensions.EXT_stencil_two_side = true;
ctx->Extensions.EXT_stencil_wrap = true;
- ctx->Extensions.EXT_texture_env_combine = true;
ctx->Extensions.EXT_texture_env_dot3 = true;
ctx->Extensions.EXT_texture_filter_anisotropic = true;
ctx->Extensions.EXT_texture_lod_bias = true;
ctx->Extensions.EXT_packed_depth_stencil = true;
ctx->Extensions.EXT_secondary_color = true;
ctx->Extensions.EXT_stencil_wrap = true;
- ctx->Extensions.EXT_texture_env_combine = true;
ctx->Extensions.EXT_texture_env_dot3 = true;
ctx->Extensions.EXT_texture_filter_anisotropic = true;
ctx->Extensions.EXT_texture_lod_bias = true;
_mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT,
GL_TEXTURE_LOD_BIAS_EXT, unit->LodBias);
}
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB,
- unit->Combine.ModeRGB);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA,
- unit->Combine.ModeA);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB,
- unit->Combine.SourceRGB[0]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB,
- unit->Combine.SourceRGB[1]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB,
- unit->Combine.SourceRGB[2]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA,
- unit->Combine.SourceA[0]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA,
- unit->Combine.SourceA[1]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_ALPHA,
- unit->Combine.SourceA[2]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB,
- unit->Combine.OperandRGB[0]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB,
- unit->Combine.OperandRGB[1]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB,
- unit->Combine.OperandRGB[2]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA,
- unit->Combine.OperandA[0]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA,
- unit->Combine.OperandA[1]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_ALPHA,
- unit->Combine.OperandA[2]);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE,
- 1 << unit->Combine.ScaleShiftRGB);
- _mesa_TexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE,
- 1 << unit->Combine.ScaleShiftA);
- }
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB,
+ unit->Combine.ModeRGB);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA,
+ unit->Combine.ModeA);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB,
+ unit->Combine.SourceRGB[0]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB,
+ unit->Combine.SourceRGB[1]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB,
+ unit->Combine.SourceRGB[2]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA,
+ unit->Combine.SourceA[0]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA,
+ unit->Combine.SourceA[1]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_ALPHA,
+ unit->Combine.SourceA[2]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB,
+ unit->Combine.OperandRGB[0]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB,
+ unit->Combine.OperandRGB[1]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB,
+ unit->Combine.OperandRGB[2]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA,
+ unit->Combine.OperandA[0]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA,
+ unit->Combine.OperandA[1]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_ALPHA,
+ unit->Combine.OperandA[2]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE,
+ 1 << unit->Combine.ScaleShiftRGB);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE,
+ 1 << unit->Combine.ScaleShiftA);
/* Restore texture object state for each target */
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
{ "GL_EXT_texture_cube_map", o(ARB_texture_cube_map), GL, 2001 },
{ "GL_EXT_texture_edge_clamp", o(dummy_true), GL, 1997 },
{ "GL_EXT_texture_env_add", o(dummy_true), GL, 1999 },
- { "GL_EXT_texture_env_combine", o(EXT_texture_env_combine), GL, 2000 },
+ { "GL_EXT_texture_env_combine", o(dummy_true), GL, 2000 },
{ "GL_EXT_texture_env_dot3", o(EXT_texture_env_dot3), GL, 2000 },
{ "GL_EXT_texture_filter_anisotropic", o(EXT_texture_filter_anisotropic), GL | ES1 | ES2, 1999 },
{ "GL_EXT_texture_format_BGRA8888", o(dummy_true), ES1 | ES2, 2005 },
ctx->Extensions.EXT_stencil_two_side = GL_TRUE;
ctx->Extensions.EXT_texture_array = GL_TRUE;
ctx->Extensions.EXT_texture_compression_latc = GL_TRUE;
- ctx->Extensions.EXT_texture_env_combine = GL_TRUE;
ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE;
ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE;
GLboolean EXT_texture_array;
GLboolean EXT_texture_compression_latc;
GLboolean EXT_texture_compression_s3tc;
- GLboolean EXT_texture_env_combine;
GLboolean EXT_texture_env_dot3;
GLboolean EXT_texture_filter_anisotropic;
GLboolean EXT_texture_integer;
case GL_DECAL:
case GL_REPLACE:
case GL_ADD:
+ case GL_COMBINE:
legal = GL_TRUE;
break;
case GL_REPLACE_EXT:
mode = GL_REPLACE; /* GL_REPLACE_EXT != GL_REPLACE */
legal = GL_TRUE;
break;
- case GL_COMBINE:
- legal = (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine);
- break;
case GL_COMBINE4_NV:
legal = ctx->Extensions.NV_texture_env_combine4;
break;
{
GLboolean legal;
- if (!ctx->Extensions.EXT_texture_env_combine &&
- !ctx->Extensions.ARB_texture_env_combine) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)");
- return;
- }
-
switch (mode) {
case GL_REPLACE:
case GL_MODULATE:
GLuint term;
GLboolean alpha, legal;
- if (!ctx->Extensions.EXT_texture_env_combine &&
- !ctx->Extensions.ARB_texture_env_combine) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)");
- return;
- }
-
/*
* Translate pname to (term, alpha).
*
GLuint term;
GLboolean alpha, legal;
- if (!ctx->Extensions.EXT_texture_env_combine &&
- !ctx->Extensions.ARB_texture_env_combine) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)");
- return;
- }
-
/* The enums were given sequential values for a reason.
*/
switch (pname) {
{
GLuint shift;
- if (!ctx->Extensions.EXT_texture_env_combine &&
- !ctx->Extensions.ARB_texture_env_combine) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(pname)");
- return;
- }
-
if (scale == 1.0F) {
shift = 0;
}
return texUnit->EnvMode;
break;
case GL_COMBINE_RGB:
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- return texUnit->Combine.ModeRGB;
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
- }
- break;
+ return texUnit->Combine.ModeRGB;
case GL_COMBINE_ALPHA:
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- return texUnit->Combine.ModeA;
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
- }
- break;
+ return texUnit->Combine.ModeA;
case GL_SOURCE0_RGB:
case GL_SOURCE1_RGB:
- case GL_SOURCE2_RGB:
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- const unsigned rgb_idx = pname - GL_SOURCE0_RGB;
- return texUnit->Combine.SourceRGB[rgb_idx];
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
- }
- break;
+ case GL_SOURCE2_RGB: {
+ const unsigned rgb_idx = pname - GL_SOURCE0_RGB;
+ return texUnit->Combine.SourceRGB[rgb_idx];
+ }
case GL_SOURCE3_RGB_NV:
if (ctx->Extensions.NV_texture_env_combine4) {
return texUnit->Combine.SourceRGB[3];
break;
case GL_SOURCE0_ALPHA:
case GL_SOURCE1_ALPHA:
- case GL_SOURCE2_ALPHA:
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- const unsigned alpha_idx = pname - GL_SOURCE0_ALPHA;
- return texUnit->Combine.SourceA[alpha_idx];
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
- }
- break;
+ case GL_SOURCE2_ALPHA: {
+ const unsigned alpha_idx = pname - GL_SOURCE0_ALPHA;
+ return texUnit->Combine.SourceA[alpha_idx];
+ }
case GL_SOURCE3_ALPHA_NV:
if (ctx->Extensions.NV_texture_env_combine4) {
return texUnit->Combine.SourceA[3];
break;
case GL_OPERAND0_RGB:
case GL_OPERAND1_RGB:
- case GL_OPERAND2_RGB:
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- const unsigned op_rgb = pname - GL_OPERAND0_RGB;
- return texUnit->Combine.OperandRGB[op_rgb];
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
- }
- break;
+ case GL_OPERAND2_RGB: {
+ const unsigned op_rgb = pname - GL_OPERAND0_RGB;
+ return texUnit->Combine.OperandRGB[op_rgb];
+ }
case GL_OPERAND3_RGB_NV:
if (ctx->Extensions.NV_texture_env_combine4) {
return texUnit->Combine.OperandRGB[3];
break;
case GL_OPERAND0_ALPHA:
case GL_OPERAND1_ALPHA:
- case GL_OPERAND2_ALPHA:
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- const unsigned op_alpha = pname - GL_OPERAND0_ALPHA;
- return texUnit->Combine.OperandA[op_alpha];
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
- }
- break;
+ case GL_OPERAND2_ALPHA: {
+ const unsigned op_alpha = pname - GL_OPERAND0_ALPHA;
+ return texUnit->Combine.OperandA[op_alpha];
+ }
case GL_OPERAND3_ALPHA_NV:
if (ctx->Extensions.NV_texture_env_combine4) {
return texUnit->Combine.OperandA[3];
}
break;
case GL_RGB_SCALE:
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- return 1 << texUnit->Combine.ScaleShiftRGB;
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
- }
- break;
+ return 1 << texUnit->Combine.ScaleShiftRGB;
case GL_ALPHA_SCALE:
- if (ctx->Extensions.EXT_texture_env_combine ||
- ctx->Extensions.ARB_texture_env_combine) {
- return 1 << texUnit->Combine.ScaleShiftA;
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
- }
- break;
+ return 1 << texUnit->Combine.ScaleShiftA;
case GL_BUMP_TARGET_ATI:
/* spec doesn't say so, but I think this should be queryable */
if (ctx->Extensions.ATI_envmap_bumpmap) {
ctx->Extensions.EXT_provoking_vertex = GL_TRUE;
ctx->Extensions.EXT_secondary_color = GL_TRUE;
ctx->Extensions.EXT_stencil_wrap = GL_TRUE;
- ctx->Extensions.EXT_texture_env_combine = GL_TRUE;
ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
ctx->Extensions.EXT_texture_lod_bias = GL_TRUE;
ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;