diff options
Diffstat (limited to 'src/mesa/main/bbox.c')
-rw-r--r-- | src/mesa/main/bbox.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/bbox.c b/src/mesa/main/bbox.c index 0ef5705532c..21843308bf6 100644 --- a/src/mesa/main/bbox.c +++ b/src/mesa/main/bbox.c @@ -36,9 +36,28 @@ _mesa_PrimitiveBoundingBox( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { + GET_CURRENT_CONTEXT(ctx); + + ctx->PrimitiveBoundingBox[0] = minX; + ctx->PrimitiveBoundingBox[1] = minY; + ctx->PrimitiveBoundingBox[2] = minZ; + ctx->PrimitiveBoundingBox[3] = minW; + ctx->PrimitiveBoundingBox[4] = maxX; + ctx->PrimitiveBoundingBox[5] = maxY; + ctx->PrimitiveBoundingBox[6] = maxZ; + ctx->PrimitiveBoundingBox[7] = maxW; } void _mesa_init_bbox(struct gl_context *ctx) { + ctx->PrimitiveBoundingBox[0] = + ctx->PrimitiveBoundingBox[1] = + ctx->PrimitiveBoundingBox[2] = -1.0f; + + ctx->PrimitiveBoundingBox[3] = + ctx->PrimitiveBoundingBox[4] = + ctx->PrimitiveBoundingBox[5] = + ctx->PrimitiveBoundingBox[6] = + ctx->PrimitiveBoundingBox[7] = 1.0f; } |