diff options
author | Brian <[email protected]> | 2007-08-10 15:29:56 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-08-10 15:29:56 -0600 |
commit | 12e3bb1a65bbff82dabc64110249c57a711501c1 (patch) | |
tree | 74544f426c35935bf47ec1ff69118ab5470563be /src | |
parent | 04ee3cecdf8ef39695bdc66120a4e3bbb9f40aca (diff) |
fix image orientation
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index d177f2d6bea..a5ba6144294 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -133,7 +133,10 @@ make_mipmap_tree(struct st_context *st, /* map texture region */ dest = pipe->region_map(pipe, mt->region); - /* put image into texture region */ + /* Put image into texture region. + * Note that the image is actually going to be upside down in + * the texture. We deal with that with texcoords. + */ success = mformat->StoreImage(st->ctx, 2, /* dims */ GL_RGBA, /* baseInternalFormat */ mformat, /* gl_texture_format */ @@ -204,25 +207,25 @@ draw_quad(struct st_context *st, GLfloat x0, GLfloat y0, GLfloat z, verts[0][0][0] = x0; verts[0][0][1] = y0; verts[0][1][0] = 0.0; - verts[0][1][1] = 1.0; + verts[0][1][1] = 0.0; /* upper-right */ verts[1][0][0] = x1; verts[1][0][1] = y0; verts[1][1][0] = 1.0; - verts[1][1][1] = 1.0; + verts[1][1][1] = 0.0; /* lower-right */ verts[2][0][0] = x1; verts[2][0][1] = y1; verts[2][1][0] = 1.0; - verts[2][1][1] = 0.0; + verts[2][1][1] = 1.0; /* lower-left */ verts[3][0][0] = x0; verts[3][0][1] = y1; verts[3][1][0] = 0.0; - verts[3][1][1] = 0.0; + verts[3][1][1] = 1.0; /* same for all verts: */ for (i = 0; i < 4; i++) { |