View | Details | Raw Unified | Return to bug 157051
Collapse All | Expand All

(-)../Mesa-6.4.2/src/mesa/main/buffers.h (+3 lines)
Lines 74-78 Link Here
74
extern void 
74
extern void 
75
_mesa_init_multisample(GLcontext *ctx);
75
_mesa_init_multisample(GLcontext *ctx);
76
76
77
extern void _mesa_set_scissor( GLcontext *ctx, 
78
			       GLint x, GLint y, GLsizei width, GLsizei height );
79
77
80
78
#endif
81
#endif
(-)../Mesa-6.4.2/src/mesa/main/buffers.c (-13 / +20 lines)
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 */
(-)../Mesa-6.4.2/src/mesa/main/context.c (-2 / +3 lines)
Lines 1588-1595 Link Here
1588
         if (newCtx->FirstTimeCurrent) {
1588
         if (newCtx->FirstTimeCurrent) {
1589
            /* set initial viewport and scissor size now */
1589
            /* set initial viewport and scissor size now */
1590
            _mesa_set_viewport(newCtx, 0, 0, drawBuffer->Width, drawBuffer->Height);
1590
            _mesa_set_viewport(newCtx, 0, 0, drawBuffer->Width, drawBuffer->Height);
1591
            newCtx->Scissor.Width = drawBuffer->Width;
1591
	    _mesa_set_scissor(newCtx, 0, 0, 
1592
            newCtx->Scissor.Height = drawBuffer->Height;
1592
			      drawBuffer->Width,
1593
			      drawBuffer->Height );
1593
         }
1594
         }
1594
      }
1595
      }
1595
1596

Return to bug 157051