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/swrast/s_texstore.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/swrast/s_texstore.c')
-rw-r--r-- | src/mesa/swrast/s_texstore.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_texstore.c b/src/mesa/swrast/s_texstore.c index fa6b74b7451..24470a73580 100644 --- a/src/mesa/swrast/s_texstore.c +++ b/src/mesa/swrast/s_texstore.c @@ -79,8 +79,8 @@ read_color_image( GLcontext *ctx, GLint x, GLint y, dst = image; stride = width * 4; for (i = 0; i < height; i++) { - _swrast_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y + i, - (GLchan (*)[4]) dst ); + _swrast_read_rgba_span(ctx, ctx->ReadBuffer->_ColorReadBuffer, + width, x, y + i, (GLchan (*)[4]) dst); dst += stride; } @@ -100,6 +100,8 @@ static GLfloat * read_depth_image( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height ) { + struct gl_renderbuffer *rb + = ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Renderbuffer; SWcontext *swrast = SWRAST_CONTEXT(ctx); GLfloat *image, *dst; GLint i; @@ -112,7 +114,7 @@ read_depth_image( GLcontext *ctx, GLint x, GLint y, dst = image; for (i = 0; i < height; i++) { - _swrast_read_depth_span_float(ctx, width, x, y + i, dst); + _swrast_read_depth_span_float(ctx, rb, width, x, y + i, dst); dst += width; } |