version 1.9 | | version 1.10 |
---|
| | |
int last_width=-1,last_height=-1; | | int last_width=-1,last_height=-1; |
int GL_TEXTURE_2D_enabled=-1; | | int GL_TEXTURE_2D_enabled=-1; |
int GL_texclamp_enabled=-1; | | int GL_texclamp_enabled=-1; |
int GL_TEXTURE_ENV_MODE_state=-1,GL_TEXTURE_MAG_FILTER_state=-1,GL_TEXTURE_MIN_FILTER_state=-1; | | |
| | |
//crude texture precaching | | //crude texture precaching |
//handles: powerups, walls, weapons, polymodels, etc. | | //handles: powerups, walls, weapons, polymodels, etc. |
| | |
// glPushMatrix(); | | // glPushMatrix(); |
| | |
// glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); | | // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); |
OGL_TEXENV(GL_TEXTURE_ENV_MODE,GL_MODULATE); | | // OGL_TEXENV(GL_TEXTURE_ENV_MODE,GL_MODULATE); |
//TODO: make texturing mode an (ingame?) option | | |
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_texmagfilt); | | // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_texmagfilt); |
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_texminfilt); | | // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_texminfilt); |
OGL_TEXPARAM(GL_TEXTURE_MAG_FILTER,GL_texmagfilt); | | // OGL_TEXPARAM(GL_TEXTURE_MAG_FILTER,GL_texmagfilt); |
OGL_TEXPARAM(GL_TEXTURE_MIN_FILTER,GL_texminfilt); | | // OGL_TEXPARAM(GL_TEXTURE_MIN_FILTER,GL_texminfilt); |
| | // glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); |
| | // glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); |
} | | } |
void ogl_end_frame(void){ | | void ogl_end_frame(void){ |
| | |
| | |
| | |
glBindTexture(GL_TEXTURE_2D, *texid); | | glBindTexture(GL_TEXTURE_2D, *texid); |
| | |
| | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); |
| | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_texmagfilt); |
| | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_texminfilt); |
// domipmap=0;//mipmaps aren't used in GL_NEAREST anyway, and making the mipmaps is pretty slow | | // domipmap=0;//mipmaps aren't used in GL_NEAREST anyway, and making the mipmaps is pretty slow |
//however, if texturing mode becomes an ingame option, they would need to be made regardless, so it could switch to them later. OTOH, texturing mode could just be made a command line arg. | | //however, if texturing mode becomes an ingame option, they would need to be made regardless, so it could switch to them later. OTOH, texturing mode could just be made a command line arg. |
| | |