Skip to content

Commit

Permalink
Use the "TOF_FLIPPED" flag for glCopyTexImage, to avoid having to do
Browse files Browse the repository at this point in the history
line-by-line copying from the screen.  Note that this will not flip the
other mipmaps if you use glCopyTexImage to update just one mipmap level.
  • Loading branch information
jsgf committed Jan 14, 2006
1 parent 2ec4b21 commit c56010c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions glCopyTexImage2D.c
Expand Up @@ -72,13 +72,13 @@ void glCopyTexImage2D(GLenum target,
/* The framebuffer and the texture are upside down with
respect to each other, so we need to flip the image (in the
framebuffer, lower addresses are in the upper-left, but for
textures, lower addresses are lower-left).
*/
y = read->height - y;
textures, lower addresses are lower-left). */
tobj->flags |= TOF_FLIPPED;
y = read->height - y - height;

struct pspgl_buffer *framebuffer = read->color_back;

__pspgl_copy_pixels(framebuffer->base, -read->pixelperline, x, y,
__pspgl_copy_pixels(framebuffer->base, read->pixelperline, x, y,
timg->image->base + timg->offset, timg->width, dest_x, dest_y,
width, height, read->pixfmt);

Expand Down

0 comments on commit c56010c

Please sign in to comment.