version 1.7 | | version 1.8 |
---|
| | |
ky = (32.0/(float)grd_curscreen->sc_h); | | ky = (32.0/(float)grd_curscreen->sc_h); |
| | |
ogl_init_state(); | | ogl_init_state(); |
glEnable( GL_TEXTURE_2D ); | | OGL_ENABLE(GL_TEXTURE_2D); |
| | // glEnable( GL_TEXTURE_2D ); |
for (i=0; i<grd_curscreen->sc_w/32; i++) { | | for (i=0; i<grd_curscreen->sc_w/32; i++) { |
for (j=0; j<grd_curscreen->sc_h/32; j++) { | | for (j=0; j<grd_curscreen->sc_h/32; j++) { |
int y,x,c,t; | | int y,x,c,t; |
| | |
| | |
// if wrap is true, the texture wraps over at the edges (repeat) | | // if wrap is true, the texture wraps over at the edges (repeat) |
// ... false, the texture ends at the edges (clamp) | | // ... false, the texture ends at the edges (clamp) |
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,GL_CLAMP ); | | // glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,GL_CLAMP ); |
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,GL_CLAMP ); | | // glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,GL_CLAMP ); |
| | OGL_TEXCLAMP(); |
| | |
glTexImage2D( GL_TEXTURE_2D, 0, 3, 32, | | glTexImage2D( GL_TEXTURE_2D, 0, 3, 32, |
32, 0, GL_RGB, GL_UNSIGNED_BYTE, kludgetexturedata ); | | 32, 0, GL_RGB, GL_UNSIGNED_BYTE, kludgetexturedata ); |
| | |
glDeleteTextures( 1, &kludgetexture ); | | glDeleteTextures( 1, &kludgetexture ); |
} | | } |
} | | } |
glDisable( GL_TEXTURE_2D ); | | // glDisable( GL_TEXTURE_2D ); |
| | |
| | |
ogl_swap_buffers();//platform specific code | | ogl_swap_buffers();//platform specific code |
| | |
if(Function_mode != FMODE_GAME){ | | if(Function_mode != FMODE_GAME){ |
grd_curcanv->cv_bitmap.bm_data[y*grd_curscreen->sc_canvas.cv_bitmap.bm_w+x]=c; | | grd_curcanv->cv_bitmap.bm_data[y*grd_curscreen->sc_canvas.cv_bitmap.bm_w+x]=c; |
}else{ | | }else{ |
| | OGL_DISABLE(GL_TEXTURE_2D); |
glPointSize(1.0); | | glPointSize(1.0); |
glBegin(GL_POINTS); | | glBegin(GL_POINTS); |
glColor3f(PAL2Tr(c),PAL2Tg(c),PAL2Tb(c)); | | glColor3f(PAL2Tr(c),PAL2Tg(c),PAL2Tb(c)); |