diff options
author | Brian Paul <[email protected]> | 2005-05-04 20:11:35 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-05-04 20:11:35 +0000 |
commit | e4b2356c07d31fbeeabb13b2fb47db703b473080 (patch) | |
tree | d8b7f1c7c9e7c84d84349485f942dd205dd4c16d /src/mesa/drivers/dri/i810/i810context.c | |
parent | ebef61f5c0950572f9c6a81b08f447957461675c (diff) |
Major check-in of changes for GL_EXT_framebuffer_object extension.
Main driver impacts:
- new code for creating the Mesa GLframebuffer
- new span/pixel read/write code
Some drivers not yet updated/tested.
Diffstat (limited to 'src/mesa/drivers/dri/i810/i810context.c')
-rw-r--r-- | src/mesa/drivers/dri/i810/i810context.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c index bf1b2fc93c6..aa4eb4be6ed 100644 --- a/src/mesa/drivers/dri/i810/i810context.c +++ b/src/mesa/drivers/dri/i810/i810context.c @@ -38,6 +38,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "matrix.h" #include "simple_list.h" #include "extensions.h" +#include "framebuffer.h" #include "imports.h" #include "swrast/swrast.h" @@ -245,7 +246,7 @@ i810CreateContext( const __GLcontextModes *mesaVis, ctx->Const.PointSizeGranularity = 1.0; ctx->Driver.GetBufferSize = i810BufferSize; - ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; + ctx->Driver.ResizeBuffers = _mesa_resize_framebuffer; ctx->Driver.GetString = i810GetString; /* Who owns who? @@ -384,11 +385,12 @@ void i810XMesaSetBackClipRects( i810ContextPtr imesa ) static void i810XMesaWindowMoved( i810ContextPtr imesa ) { - switch (imesa->glCtx->Color._DrawDestMask[0]) { - case DD_FRONT_LEFT_BIT: + /* Determine current color drawing buffer */ + switch (imesa->glCtx->DrawBuffer->_ColorDrawBufferMask[0]) { + case BUFFER_BIT_FRONT_LEFT: i810XMesaSetFrontClipRects( imesa ); break; - case DD_BACK_LEFT_BIT: + case BUFFER_BIT_BACK_LEFT: i810XMesaSetBackClipRects( imesa ); break; default: @@ -424,16 +426,16 @@ i810MakeCurrent(__DRIcontextPrivate *driContextPriv, */ imesa->driDrawable = driDrawPriv; - _mesa_make_current2(imesa->glCtx, - (GLframebuffer *) driDrawPriv->driverPrivate, - (GLframebuffer *) driReadPriv->driverPrivate); + _mesa_make_current(imesa->glCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate); /* Are these necessary? */ i810XMesaWindowMoved( imesa ); } else { - _mesa_make_current(0,0); + _mesa_make_current(NULL, NULL, NULL); } return GL_TRUE; @@ -445,11 +447,12 @@ i810UpdatePageFlipping( i810ContextPtr imesa ) GLcontext *ctx = imesa->glCtx; int front = 0; - switch (ctx->Color._DrawDestMask[0]) { - case DD_FRONT_LEFT_BIT: + /* Determine current color drawing buffer */ + switch (ctx->DrawBuffer->_ColorDrawBufferMask[0]) { + case BUFFER_BIT_FRONT_LEFT: front = 1; break; - case DD_BACK_LEFT_BIT: + case BUFFER_BIT_BACK_LEFT: front = 0; break; default: |