projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49653c0
)
meta: set viewport and projection matrix in _mesa_meta_GenerateMipmap
author
Brian Paul
<brianp@vmware.com>
Thu, 7 Jan 2010 01:12:42 +0000
(18:12 -0700)
committer
Brian Paul
<brianp@vmware.com>
Thu, 7 Jan 2010 01:20:17 +0000
(18:20 -0700)
This fixes mipmap levels being clipped to the last viewport.
Based on a patch submitted by Pierre Willenbrock <pierre@pirsoft.de>
src/mesa/drivers/common/meta.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/common/meta.c
b/src/mesa/drivers/common/meta.c
index cd9075b39367d75655109e5c15ab0ce8fa6a10ab..adc986402c12ebed88c856823f807a4be69749d0 100644
(file)
--- a/
src/mesa/drivers/common/meta.c
+++ b/
src/mesa/drivers/common/meta.c
@@
-2408,6
+2408,15
@@
_mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target,
break;
}
+ assert(dstWidth == ctx->DrawBuffer->Width);
+ assert(dstHeight == ctx->DrawBuffer->Height);
+
+ /* setup viewport and matching projection matrix */
+ _mesa_set_viewport(ctx, 0, 0, dstWidth, dstHeight);
+ _mesa_MatrixMode(GL_PROJECTION);
+ _mesa_LoadIdentity();
+ _mesa_Ortho(0.0F, dstWidth, 0.0F, dstHeight, -1.0F, 1.0F);
+
_mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4);
}