summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2001-08-02 19:58:07 +0000
committerKeith Whitwell <[email protected]>2001-08-02 19:58:07 +0000
commit51184566fb6686ae34a39a5532812d7f1d8edb94 (patch)
tree8a97552e7c3d0350e34ff30e4b1490da91d90894 /src/mesa/tnl
parentc618005dcff0d4011a77cfebd109880eb784d581 (diff)
Fix SGL monoindexed bug (glDrawRangeElements in dlist)
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_array_api.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c
index 257febefa15..cbca11e36e7 100644
--- a/src/mesa/tnl/t_array_api.c
+++ b/src/mesa/tnl/t_array_api.c
@@ -1,4 +1,4 @@
-/* $Id: t_array_api.c,v 1.15 2001/05/11 15:53:06 keithw Exp $ */
+/* $Id: t_array_api.c,v 1.16 2001/08/02 19:58:07 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -313,8 +313,6 @@ _tnl_DrawRangeElements(GLenum mode,
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint *ui_indices;
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
-
/* Check arguments, etc.
*/
if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count,
@@ -328,7 +326,12 @@ _tnl_DrawRangeElements(GLenum mode,
count, type, indices );
- if (ctx->Array.LockCount) {
+ if (ctx->CompileFlag) {
+ /* Can't do anything when compiling:
+ */
+ fallback_drawelements( ctx, mode, count, ui_indices );
+ }
+ else if (ctx->Array.LockCount) {
/* Are the arrays already locked? If so we currently have to look
* at the whole locked range.
*/
@@ -388,7 +391,12 @@ _tnl_DrawElements(GLenum mode, GLsizei count, GLenum type,
ui_indices = (GLuint *)_ac_import_elements( ctx, GL_UNSIGNED_INT,
count, type, indices );
- if (ctx->Array.LockCount) {
+ if (ctx->CompileFlag) {
+ /* Can't do anything when compiling:
+ */
+ fallback_drawelements( ctx, mode, count, ui_indices );
+ }
+ else if (ctx->Array.LockCount) {
_tnl_draw_range_elements( ctx, mode,
ctx->Array.LockFirst,
ctx->Array.LockCount,