version 1.4 | | version 1.5 |
---|
| | |
#include <GL/glu.h> | | #include <GL/glu.h> |
int gl_initialized=0; | | int gl_initialized=0; |
| | |
//kludge can either use points, or a texture.. texture doesn't work so well since its mipmapped and I dunno how to change that ;) | | //kludge can either use points, or a texture.. texture doesn't work so well since its not a multiple of 2, and so the texture loading thingy resizes it, I guess. |
#define KLUDGEPOINT | | #define KLUDGEPOINT |
#ifndef KLUDGEPOINT | | #ifndef KLUDGEPOINT |
GLuint kludgetexture; | | GLuint kludgetexture; |
| | |
glBindTexture( GL_TEXTURE_2D, kludgetexture ); | | glBindTexture( GL_TEXTURE_2D, kludgetexture ); |
glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL ); | | glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL ); |
// when texture area is small, bilinear filter the closest MIP map | | // when texture area is small, bilinear filter the closest MIP map |
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST ); | | glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_NEAREST ); |
// glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_NONE ); | | // glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_NONE ); |
// when texture area is large, bilinear filter the first MIP map | | // when texture area is large, bilinear filter the first MIP map |
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); | | glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); |
// glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NONE ); | | // glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NONE ); |
| | |
// if wrap is true, the texture wraps over at the edges (repeat) | | // if wrap is true, the texture wraps over at the edges (repeat) |