MCPcopy Create free account
hub / github.com/assaultcube/AC / formatsize

Function formatsize

source/src/texture.cpp:76–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74VARFP(aniso, 0, 0, 16, initwarning("texture filtering", INIT_LOAD));
75
76int 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
89void resizetexture(int w, int h, bool mipmap, bool canreduce, GLenum target, int &tw, int &th)
90{

Callers 1

uploadtextureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected