version 1.22 | | version 1.23 |
---|
| | |
return 0; | | return 0; |
} | | } |
#else | | #else |
bool ogl_ubitblt(int w,int h,int dx,int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest) | | bool ogl_ubitblt_i(int dw,int dh,int dx,int dy, int sw, int sh, int sx, int sy, grs_bitmap * src, grs_bitmap * dest) |
{ | | { |
GLfloat xo,yo,xs,ys; | | GLfloat xo,yo,xs,ys; |
GLfloat u1,v1;//,u2,v2; | | GLfloat u1,v1;//,u2,v2; |
| | |
r_ubitbltc++; | | r_ubitbltc++; |
| | |
ogl_init_texture(&tex); | | ogl_init_texture(&tex); |
tex.w=w;tex.h=h; | | tex.w=sw;tex.h=sh; |
tex.prio=0.0;tex.wantmip=0; | | tex.prio=0.0;tex.wantmip=0; |
tex.lw=src->bm_rowsize; | | tex.lw=src->bm_rowsize; |
| | |
| | |
dx+=dest->bm_x; | | dx+=dest->bm_x; |
dy+=dest->bm_y; | | dy+=dest->bm_y; |
xo=dx/(float)last_width; | | xo=dx/(float)last_width; |
xs=w/(float)last_width; | | xs=dw/(float)last_width; |
yo=1.0-dy/(float)last_height; | | yo=1.0-dy/(float)last_height; |
ys=h/(float)last_height; | | ys=dh/(float)last_height; |
| | |
OGL_ENABLE(TEXTURE_2D); | | OGL_ENABLE(TEXTURE_2D); |
| | |
| | |
glEnd(); | | glEnd(); |
ogl_freetexture(&tex); | | ogl_freetexture(&tex); |
return 0; | | return 0; |
| | } |
| | bool ogl_ubitblt(int w,int h,int dx,int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest){ |
| | return ogl_ubitblt_i(w,h,dx,dy,w,h,sx,sy,src,dest); |
} | | } |
#endif | | #endif |
bool ogl_ubitblt_tolinear(int w,int h,int dx,int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest){ | | bool ogl_ubitblt_tolinear(int w,int h,int dx,int dy, int sx, int sy, grs_bitmap * src, grs_bitmap * dest){ |