Browse Source

mesa: short-circuit no-change in _mesa_DepthRange()

tags/mesa_7_6_rc1
Brian Paul 16 years ago
parent
commit
b9f67df6e7
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/mesa/main/viewport.c

+ 4
- 0
src/mesa/main/viewport.c View File

@@ -120,6 +120,10 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval)
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glDepthRange %f %f\n", nearval, farval);

if (ctx->Viewport.Near == nearval &&
ctx->Viewport.Far == farval)
return;

ctx->Viewport.Near = (GLfloat) CLAMP(nearval, 0.0, 1.0);
ctx->Viewport.Far = (GLfloat) CLAMP(farval, 0.0, 1.0);
ctx->NewState |= _NEW_VIEWPORT;

Loading…
Cancel
Save