diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2006-06-15 12:45:52 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2006-06-15 12:45:52 +0000 |
commit | 976d00080b935adb38a8ee8108c7b6b9127d9394 (patch) | |
tree | 13cfb3184e8b3b8d4257da898e97c8bd76cfd80e | |
parent | f2fc474d714ce98f175177ee12c61cf7f781364a (diff) |
Call _mesa_resize_framebuffer() and recalculate some
window-position-dependent state within intelWindowMoved(). Fixes
googleearth glitches.
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_context.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index bdf02c766e..6e85de2560 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -512,6 +512,8 @@ void intelSetBackClipRects( intelContextPtr intel ) void intelWindowMoved( intelContextPtr intel ) { + __DRIdrawablePrivate *dPriv = intel->driDrawable; + if (!intel->ctx.DrawBuffer) { intelSetFrontClipRects( intel ); } @@ -528,6 +530,23 @@ void intelWindowMoved( intelContextPtr intel ) intelSetFrontClipRects( intel ); } } + + _mesa_resize_framebuffer(&intel->ctx, + (GLframebuffer*)dPriv->driverPrivate, + dPriv->w, dPriv->h); + + /* Set state we know depends on drawable parameters: + */ + { + GLcontext *ctx = &intel->ctx; + + ctx->Driver.Scissor( ctx, ctx->Scissor.X, ctx->Scissor.Y, + ctx->Scissor.Width, ctx->Scissor.Height ); + + ctx->Driver.DepthRange( ctx, + ctx->Viewport.Near, + ctx->Viewport.Far ); + } } GLboolean intelUnbindContext(__DRIcontextPrivate *driContextPriv) @@ -601,6 +620,11 @@ void intelGetLock( intelContextPtr intel, GLuint flags ) if (dPriv && intel->lastStamp != dPriv->lastStamp) { intelWindowMoved( intel ); + + _mesa_resize_framebuffer(&intel->ctx, + (GLframebuffer*)dPriv->driverPrivate, + dPriv->w, dPriv->h); + intel->lastStamp = dPriv->lastStamp; } } |