version 1.24 | | version 1.25 |
---|
| | |
unsigned char *d,*s; | | unsigned char *d,*s; |
int i,j; | | int i,j; |
int w1,h1; | | int w1,h1; |
char data[1024*1024]; | | //char data[1024*1024]; |
| | char data[OGLTEXBUFSIZE/4]; |
// w1=w;h1=h; | | // w1=w;h1=h; |
w1=grd_curscreen->sc_w;h1=grd_curscreen->sc_h; | | w1=grd_curscreen->sc_w;h1=grd_curscreen->sc_h; |
| | if (w1*h1*4>OGLTEXBUFSIZE) |
| | Error("ogl_ubitblt_tolinear: screen res larger than OGLTEXBUFSIZE\n"); |
| | |
if (ogl_readpixels_ok>0){ | | if (ogl_readpixels_ok>0){ |
OGL_DISABLE(TEXTURE_2D); | | OGL_DISABLE(TEXTURE_2D); |
glReadBuffer(GL_FRONT); | | glReadBuffer(GL_FRONT); |
glReadPixels(0,0,grd_curscreen->sc_w,grd_curscreen->sc_h,GL_RGB,GL_UNSIGNED_BYTE,texbuf); | | glReadPixels(0,0,w1,h1,GL_RGB,GL_UNSIGNED_BYTE,texbuf); |
// glReadPixels(sx,grd_curscreen->sc_h-(sy+h),w,h,GL_RGB,GL_UNSIGNED_BYTE,texbuf); | | // glReadPixels(sx,grd_curscreen->sc_h-(sy+h),w,h,GL_RGB,GL_UNSIGNED_BYTE,texbuf); |
// glReadPixels(sx,sy,w+sx,h+sy,GL_RGB,GL_UNSIGNED_BYTE,texbuf); | | // glReadPixels(sx,sy,w+sx,h+sy,GL_RGB,GL_UNSIGNED_BYTE,texbuf); |
}else | | }else |
| | |
#else | | #else |
int i,j,c=0; | | int i,j,c=0; |
unsigned char *d,*s,*e; | | unsigned char *d,*s,*e; |
| | if (w*h*4>OGLTEXBUFSIZE) |
| | Error("ogl_ubitblt_tolinear: size larger than OGLTEXBUFSIZE\n"); |
sx+=src->bm_x; | | sx+=src->bm_x; |
sy+=src->bm_y; | | sy+=src->bm_y; |
#if 1//also seems to cause a mess. need to look into it a bit more.. | | #if 1//also seems to cause a mess. need to look into it a bit more.. |