aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-11-06 17:08:02 +0000
committerBrian Paul <[email protected]>2000-11-06 17:08:02 +0000
commit4f3e7cd3cf44ef36c77f60105898d506fa08a5ea (patch)
treee581f6d2147752449dd78a3d88c5ee2520d58d90 /src/mesa
parent8fa6b363dbed32f4e18b4b83866658c62fba8d39 (diff)
added a setup function for selection/feedback
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/swrast_setup/ss_vb.c48
1 files changed, 29 insertions, 19 deletions
diff --git a/src/mesa/swrast_setup/ss_vb.c b/src/mesa/swrast_setup/ss_vb.c
index 7f8fbdfdc5b..6849c0c0802 100644
--- a/src/mesa/swrast_setup/ss_vb.c
+++ b/src/mesa/swrast_setup/ss_vb.c
@@ -92,6 +92,10 @@ static SetupFunc setup_func[MAX_SETUPFUNC];
#define TAG(x) x##_multitex_color_spec_index_eye_fog
#include "ss_vbtmp.h"
+#define IND (COLOR|INDEX|TEX0)
+#define TAG(x) x##_selection_feedback
+#include "ss_vbtmp.h"
+
void
@@ -138,6 +142,8 @@ _swsetup_vb_init( GLcontext *ctx )
setup_func[TEX0|EYE] = rs_tex0_color_eye;
setup_func[TEX0|COLOR|EYE] = rs_tex0_color_eye;
+
+ setup_func[COLOR|INDEX|TEX0] = rs_selection_feedback;
}
@@ -147,27 +153,31 @@ _swsetup_choose_rastersetup_func(GLcontext *ctx)
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
int funcindex;
- if (ctx->Visual.RGBAflag) {
- funcindex = COLOR;
-
- if (ctx->Texture._ReallyEnabled & ~0xf)
- funcindex |= MULTITEX;
- else if (ctx->Texture._ReallyEnabled & 0xf)
- funcindex |= TEX0;
-
- if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ||
- ctx->Fog.ColorSumEnabled)
- funcindex |= SPEC;
-
- if (ctx->Point._Attenuated)
- funcindex |= EYE;
+ if (ctx->RenderMode == GL_RENDER) {
+ if (ctx->Visual.RGBAflag) {
+ funcindex = COLOR;
+
+ if (ctx->Texture._ReallyEnabled & ~0xf)
+ funcindex |= MULTITEX;
+ else if (ctx->Texture._ReallyEnabled & 0xf)
+ funcindex |= TEX0;
+
+ if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ||
+ ctx->Fog.ColorSumEnabled)
+ funcindex |= SPEC;
+
+ if (ctx->Point._Attenuated)
+ funcindex |= EYE;
+ }
+ else {
+ funcindex = INDEX;
+ }
+ }
+ else {
+ /* feedback or section */
+ funcindex = (COLOR | INDEX | TEX0);
}
- else
- funcindex = INDEX;
- if (ctx->RenderMode != GL_RENDER)
- funcindex = (INDEX|COLOR|MULTITEX);
-
swsetup->RasterSetup = setup_func[funcindex];
}