WIP, trying to get blur to work with mipmaps

This commit is contained in:
Tleety
2016-03-10 12:18:06 +01:00
parent 592edf7dba
commit a2244e87ad
7 changed files with 106 additions and 53 deletions
@@ -28,7 +28,8 @@ void CommonFunctions::GenerateMipMapTexture(GLuint* texture, GLenum wrapping, gl
glGenTextures(1, texture);
glBindTexture(GL_TEXTURE_2D, *texture);
glTexStorage2D(GL_TEXTURE_2D, numMipMaps, GL_RGBA8, dimensions.x, dimensions.y);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, dimensions.x, dimensions.y, format, type, texture);
//glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, dimensions.x, dimensions.y, format, type, NULL);
GLERROR("MipMap Texture glTexSubImage2D failed");
glGenerateMipmap(GL_TEXTURE_2D);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrapping);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrapping);