| 74 | VARFP(aniso, 0, 0, 16, initwarning("texture filtering", INIT_LOAD)); |
| 75 | |
| 76 | int formatsize(GLenum format) |
| 77 | { |
| 78 | switch(format) |
| 79 | { |
| 80 | case GL_LUMINANCE: |
| 81 | case GL_ALPHA: return 1; |
| 82 | case GL_LUMINANCE_ALPHA: return 2; |
| 83 | case GL_RGB: return 3; |
| 84 | case GL_RGBA: return 4; |
| 85 | default: return 4; |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | void resizetexture(int w, int h, bool mipmap, bool canreduce, GLenum target, int &tw, int &th) |
| 90 | { |