version 1.5 | | version 1.6 |
---|
| | |
| | |
extern int gl_initialized; | | extern int gl_initialized; |
| | |
| | extern int GL_TEXTURE_2D_enabled; |
| | extern int GL_texclamp_enabled; |
| | #define OGL_ENABLE2(a,f) {if (a ## _enabled!=1) {f;a ## _enabled=1;}} |
| | #define OGL_DISABLE2(a,f) {if (a ## _enabled!=0) {f;a ## _enabled=0;}} |
| | |
| | #define OGL_ENABLE(a) OGL_ENABLE2(a,glEnable(a)) |
| | #define OGL_DISABLE(a) OGL_DISABLE2(a,glDisable(a)) |
| | |
| | #define OGL_TEXCLAMP() OGL_ENABLE2(GL_texclamp,glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);) |
| | #define OGL_TEXREPEAT() OGL_DISABLE2(GL_texclamp,glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);) |
| | |
| | |
//platform specific funcs | | //platform specific funcs |
//MSVC seems to have problems with inline funcs not being found during linking | | //MSVC seems to have problems with inline funcs not being found during linking |
#ifndef _MSC_VER | | #ifndef _MSC_VER |