Browse Source

st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted position

If the renderbuffer orientation is Y=0=TOP we need to invert the dstY
position.
tags/mesa_7_5_1
Brian Paul 17 years ago
parent
commit
c3a0624ef0
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/mesa/state_tracker/st_cb_drawpixels.c

+ 4
- 0
src/mesa/state_tracker/st_cb_drawpixels.c View File

@@ -842,6 +842,10 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
else
usage = PIPE_TRANSFER_WRITE;
if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
dsty = rbDraw->Base.Height - dsty - height;
}

ptDraw = st_cond_flush_get_tex_transfer(st_context(ctx),
rbDraw->texture, 0, 0, 0,
usage, dstx, dsty,

Loading…
Cancel
Save