summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r--src/mesa/main/api_validate.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 8d3cbafc64c..3a0ce52b960 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -1,11 +1,10 @@
-
-/* $Id: api_validate.c,v 1.4 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: api_validate.c,v 1.5 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -34,10 +33,10 @@
GLboolean
_mesa_validate_DrawElements(GLcontext *ctx,
- GLenum mode, GLsizei count, GLenum type,
+ GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
if (count <= 0) {
if (count < 0)
@@ -45,14 +44,14 @@ _mesa_validate_DrawElements(GLcontext *ctx,
return GL_FALSE;
}
- if (mode < 0 ||
+ if (mode < 0 ||
mode > GL_POLYGON) {
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" );
return GL_FALSE;
}
- if (type != GL_UNSIGNED_INT &&
- type != GL_UNSIGNED_BYTE &&
+ if (type != GL_UNSIGNED_INT &&
+ type != GL_UNSIGNED_BYTE &&
type != GL_UNSIGNED_SHORT)
{
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
@@ -70,12 +69,12 @@ _mesa_validate_DrawElements(GLcontext *ctx,
GLboolean
-_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
+_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
+ GLuint start, GLuint end,
+ GLsizei count, GLenum type,
const GLvoid *indices)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
if (count <= 0) {
if (count < 0)
@@ -93,8 +92,8 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
return GL_FALSE;
}
- if (type != GL_UNSIGNED_INT &&
- type != GL_UNSIGNED_BYTE &&
+ if (type != GL_UNSIGNED_INT &&
+ type != GL_UNSIGNED_BYTE &&
type != GL_UNSIGNED_SHORT)
{
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
@@ -113,10 +112,10 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
GLboolean
-_mesa_validate_DrawArrays(GLcontext *ctx,
+_mesa_validate_DrawArrays(GLcontext *ctx,
GLenum mode, GLint start, GLsizei count)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
if (count<0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" );
@@ -131,9 +130,8 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
if (ctx->NewState)
_mesa_update_state( ctx );
- if (!ctx->Array.Vertex.Enabled)
+ if (!ctx->Array.Vertex.Enabled)
return GL_FALSE;
return GL_TRUE;
}
-