mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
Don't call Driver->Bitmap() if no image to render
This commit is contained in:
parent
9b2762d7b9
commit
0a5fea5f96
1 changed files with 7 additions and 5 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* Mesa 3-D graphics library
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -363,10 +363,12 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
|
|||
}
|
||||
|
||||
if (ctx->RenderMode == GL_RENDER) {
|
||||
/* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
|
||||
GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
|
||||
GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
|
||||
ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
|
||||
if (bitmap) {
|
||||
/* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
|
||||
GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
|
||||
GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
|
||||
ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
|
||||
}
|
||||
}
|
||||
#if _HAVE_FULL_GL
|
||||
else if (ctx->RenderMode == GL_FEEDBACK) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue