=== modified file 'src/texture.cpp'
@@ -62,21 +62,21 @@
glBindTexture(GL_TEXTURE_2D, pTexture[0]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexImage2D(GL_TEXTURE_2D, 0, nOfColors, surface->w, surface->h, 0,
+ glTexImage2D(GL_TEXTURE_2D, 0, texture_format, surface->w, surface->h, 0,
texture_format, GL_UNSIGNED_BYTE, surface->pixels);
// Create Linear Filtered Texture
glBindTexture(GL_TEXTURE_2D, pTexture[1]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexImage2D(GL_TEXTURE_2D, 0, nOfColors, surface->w, surface->h, 0,
+ glTexImage2D(GL_TEXTURE_2D, 0, texture_format, surface->w, surface->h, 0,
texture_format, GL_UNSIGNED_BYTE, surface->pixels);
// Create trilinear filtered mipmapped texture
glBindTexture(GL_TEXTURE_2D, pTexture[2]);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexImage2D(GL_TEXTURE_2D, 0, nOfColors, surface->w, surface->h, 0,
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
+ glTexImage2D(GL_TEXTURE_2D, 0, texture_format, surface->w, surface->h, 0,
texture_format, GL_UNSIGNED_BYTE, surface->pixels);
glGenerateMipmap(GL_TEXTURE_2D);
}