summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_cull.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-16 18:11:55 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-16 18:11:55 -0600
commit3fc926f3740da9ec27853d158243055f3cb43d43 (patch)
tree67b5f9e3b8945d45cac4776a1b5e1e4f122cf137 /src/mesa/pipe/draw/draw_cull.c
parente3bdd66bf69fb12fa02d161989755944077b280d (diff)
Remove many dependencies on mesa headers.
To build with mesa, need -DMESA in makefile/config file.
Diffstat (limited to 'src/mesa/pipe/draw/draw_cull.c')
-rw-r--r--src/mesa/pipe/draw/draw_cull.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/pipe/draw/draw_cull.c b/src/mesa/pipe/draw/draw_cull.c
index 48a7f5dab8..f3d56ad719 100644
--- a/src/mesa/pipe/draw/draw_cull.c
+++ b/src/mesa/pipe/draw/draw_cull.c
@@ -33,14 +33,14 @@
*/
-#include "main/imports.h"
+#include "pipe/p_util.h"
#include "pipe/p_defines.h"
#include "draw_private.h"
struct cull_stage {
struct draw_stage stage;
- GLuint winding; /**< which winding(s) to cull (one of PIPE_WINDING_x) */
+ unsigned winding; /**< which winding(s) to cull (one of PIPE_WINDING_x) */
};
@@ -64,15 +64,15 @@ static void cull_tri( struct draw_stage *stage,
struct prim_header *header )
{
/* Window coords: */
- const GLfloat *v0 = header->v[0]->data[0];
- const GLfloat *v1 = header->v[1]->data[0];
- const GLfloat *v2 = header->v[2]->data[0];
+ const float *v0 = header->v[0]->data[0];
+ const float *v1 = header->v[1]->data[0];
+ const float *v2 = header->v[2]->data[0];
/* edge vectors e = v0 - v2, f = v1 - v2 */
- GLfloat ex = v0[0] - v2[0];
- GLfloat ey = v0[1] - v2[1];
- GLfloat fx = v1[0] - v2[0];
- GLfloat fy = v1[1] - v2[1];
+ const float ex = v0[0] - v2[0];
+ const float ey = v0[1] - v2[1];
+ const float fx = v1[0] - v2[0];
+ const float fy = v1[1] - v2[1];
/* det = cross(e,f).z */
header->det = ex * fy - ey * fx;
@@ -81,7 +81,7 @@ static void cull_tri( struct draw_stage *stage,
/* if (det < 0 then Z points toward camera and triangle is
* counter-clockwise winding.
*/
- GLuint winding = (header->det < 0) ? PIPE_WINDING_CCW : PIPE_WINDING_CW;
+ unsigned winding = (header->det < 0) ? PIPE_WINDING_CCW : PIPE_WINDING_CW;
if ((winding & cull_stage(stage)->winding) == 0) {
/* triangle is not culled, pass to next stage */