mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
fixed the sizes in renderbuffer
This commit is contained in:
parent
09b6bdf148
commit
429907e99e
@ -114,11 +114,11 @@ void renderbuffer::make_surface() {
|
||||
SDL_Surface *renderbuffer::render() {
|
||||
make_surface() ;
|
||||
if(FramebufferName) {
|
||||
glReadPixels(0, 0, vid.xres, vid.yres, GL_BGRA, GL_UNSIGNED_BYTE, srf->pixels);
|
||||
glReadPixels(0, 0, x, y, GL_BGRA, GL_UNSIGNED_BYTE, srf->pixels);
|
||||
GLERR("readPixels");
|
||||
for(int y=0; y<vid.yres/2; y++)
|
||||
for(int x=0; x<vid.xres; x++)
|
||||
swap(qpixel(srf,x,y), qpixel(srf,x,vid.yres-1-y));
|
||||
for(int iy=0; iy<y/2; iy++)
|
||||
for(int ix=0; ix<x; ix++)
|
||||
swap(qpixel(srf,ix,iy), qpixel(srf,ix,vid.yres-1-iy));
|
||||
}
|
||||
return srf;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user