|
Lines 653-672
Link Here
|
| 653 |
* change flushes the vertices and notifies the driver via |
653 |
* change flushes the vertices and notifies the driver via |
| 654 |
* the dd_function_table::Scissor callback. |
654 |
* the dd_function_table::Scissor callback. |
| 655 |
*/ |
655 |
*/ |
| 656 |
void GLAPIENTRY |
656 |
void _mesa_set_scissor( GLcontext *ctx, |
| 657 |
_mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) |
657 |
GLint x, GLint y, GLsizei width, GLsizei height ) |
| 658 |
{ |
658 |
{ |
| 659 |
GET_CURRENT_CONTEXT(ctx); |
|
|
| 660 |
ASSERT_OUTSIDE_BEGIN_END(ctx); |
| 661 |
|
| 662 |
if (width < 0 || height < 0) { |
| 663 |
_mesa_error( ctx, GL_INVALID_VALUE, "glScissor" ); |
| 664 |
return; |
| 665 |
} |
| 666 |
|
| 667 |
if (MESA_VERBOSE & VERBOSE_API) |
| 668 |
_mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height); |
| 669 |
|
| 670 |
if (x == ctx->Scissor.X && |
659 |
if (x == ctx->Scissor.X && |
| 671 |
y == ctx->Scissor.Y && |
660 |
y == ctx->Scissor.Y && |
| 672 |
width == ctx->Scissor.Width && |
661 |
width == ctx->Scissor.Width && |
|
Lines 684-689
Link Here
|
| 684 |
} |
673 |
} |
| 685 |
|
674 |
|
| 686 |
|
675 |
|
|
|
676 |
void GLAPIENTRY |
| 677 |
_mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) |
| 678 |
{ |
| 679 |
GET_CURRENT_CONTEXT(ctx); |
| 680 |
ASSERT_OUTSIDE_BEGIN_END(ctx); |
| 681 |
|
| 682 |
if (width < 0 || height < 0) { |
| 683 |
_mesa_error( ctx, GL_INVALID_VALUE, "glScissor" ); |
| 684 |
return; |
| 685 |
} |
| 686 |
|
| 687 |
if (MESA_VERBOSE & VERBOSE_API) |
| 688 |
_mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height); |
| 689 |
|
| 690 |
_mesa_set_scissor(ctx, x, y, width, height); |
| 691 |
} |
| 692 |
|
| 693 |
|
| 687 |
|
694 |
|
| 688 |
/**********************************************************************/ |
695 |
/**********************************************************************/ |
| 689 |
/** \name Initialization */ |
696 |
/** \name Initialization */ |