nasty bug in Texture::create
[laserbrain_demo] / src / texture.cc
index ed34798..3af8116 100644 (file)
@@ -185,7 +185,7 @@ void Texture::create(int xsz, int ysz, TextureType textype, unsigned int ifmt)
        glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
        glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 
-       switch(type) {
+       switch(textype) {
        case TEX_2D:
                glTexImage2D(GL_TEXTURE_2D, 0, glifmt_from_ifmt(ifmt), xsz, ysz, 0, fmt, type, 0);
                break;