mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
ported render begin/end calls from Mesa 3.4
This commit is contained in:
parent
1873b567b2
commit
d367216678
3 changed files with 17 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: accum.c,v 1.26 2000/09/26 20:53:53 brianp Exp $ */
|
||||
/* $Id: accum.c,v 1.27 2000/10/17 00:42:02 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -236,6 +236,8 @@ _mesa_Accum( GLenum op, GLfloat value )
|
|||
if (ctx->IntegerAccumMode && value != ctx->IntegerAccumScaler)
|
||||
rescale_accum(ctx);
|
||||
|
||||
RENDER_START(ctx);
|
||||
|
||||
if (ctx->IntegerAccumMode) {
|
||||
/* simply add integer color values into accum buffer */
|
||||
GLuint j;
|
||||
|
|
@ -279,6 +281,7 @@ _mesa_Accum( GLenum op, GLfloat value )
|
|||
/* restore read buffer = draw buffer (the default) */
|
||||
(*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
|
||||
ctx->Color.DriverDrawBuffer );
|
||||
RENDER_FINISH(ctx);
|
||||
break;
|
||||
|
||||
case GL_LOAD:
|
||||
|
|
@ -299,6 +302,7 @@ _mesa_Accum( GLenum op, GLfloat value )
|
|||
ctx->IntegerAccumScaler = 0.0;
|
||||
}
|
||||
|
||||
RENDER_START(ctx);
|
||||
if (ctx->IntegerAccumMode) {
|
||||
/* just copy values into accum buffer */
|
||||
GLuint j;
|
||||
|
|
@ -342,6 +346,7 @@ _mesa_Accum( GLenum op, GLfloat value )
|
|||
/* restore read buffer = draw buffer (the default) */
|
||||
(*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
|
||||
ctx->Color.DriverDrawBuffer );
|
||||
RENDER_FINISH(ctx);
|
||||
break;
|
||||
|
||||
case GL_RETURN:
|
||||
|
|
@ -349,6 +354,7 @@ _mesa_Accum( GLenum op, GLfloat value )
|
|||
if (ctx->IntegerAccumMode && value != 1.0)
|
||||
rescale_accum(ctx);
|
||||
|
||||
RENDER_START(ctx);
|
||||
if (ctx->IntegerAccumMode && ctx->IntegerAccumScaler > 0) {
|
||||
/* build lookup table to avoid many floating point multiplies */
|
||||
static GLchan multTable[32768];
|
||||
|
|
@ -412,6 +418,7 @@ _mesa_Accum( GLenum op, GLfloat value )
|
|||
ypos++;
|
||||
}
|
||||
}
|
||||
RENDER_FINISH(ctx);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: buffers.c,v 1.12 2000/09/26 20:53:53 brianp Exp $ */
|
||||
/* $Id: buffers.c,v 1.13 2000/10/17 00:42:02 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -290,6 +290,8 @@ _mesa_Clear( GLbitfield mask )
|
|||
}
|
||||
#endif
|
||||
|
||||
RENDER_START(ctx);
|
||||
|
||||
/* do software clearing here */
|
||||
if (newMask) {
|
||||
if (newMask & ctx->Color.DrawDestMask) clear_color_buffers(ctx);
|
||||
|
|
@ -305,6 +307,8 @@ _mesa_Clear( GLbitfield mask )
|
|||
_mesa_clear_alpha_buffers( ctx );
|
||||
}
|
||||
|
||||
RENDER_FINISH(ctx);
|
||||
|
||||
#ifdef PROFILE
|
||||
ctx->ClearTime += gl_time() - t0;
|
||||
ctx->ClearCount++;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: drawpix.c,v 1.37 2000/10/05 16:22:23 brianp Exp $ */
|
||||
/* $Id: drawpix.c,v 1.38 2000/10/17 00:42:02 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -410,8 +410,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
|
|||
}
|
||||
else if (format==GL_COLOR_INDEX && type==GL_UNSIGNED_BYTE) {
|
||||
GLubyte *src = (GLubyte *) pixels + skipRows * rowLength + skipPixels;
|
||||
if (ctx->Visual.RGBAflag
|
||||
&& ctx->ImageTransferState==IMAGE_MAP_COLOR_BIT) {
|
||||
if (ctx->Visual.RGBAflag) {
|
||||
/* convert CI data to RGBA */
|
||||
if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) {
|
||||
/* no zooming */
|
||||
|
|
@ -879,6 +878,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
|
|||
return;
|
||||
}
|
||||
|
||||
RENDER_START(ctx);
|
||||
switch (format) {
|
||||
case GL_STENCIL_INDEX:
|
||||
draw_stencil_pixels( ctx, x, y, width, height, type, pixels );
|
||||
|
|
@ -907,8 +907,8 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
|
|||
break;
|
||||
default:
|
||||
gl_error( ctx, GL_INVALID_ENUM, "glDrawPixels(format)" );
|
||||
return;
|
||||
}
|
||||
RENDER_FINISH(ctx);
|
||||
}
|
||||
else if (ctx->RenderMode==GL_FEEDBACK) {
|
||||
if (ctx->Current.RasterPosValid) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue