MSAA mostly working. Only merging the MS render buffer to a single texture so that others could use the AA texture easly

This commit is contained in:
Teejoon
2016-03-11 19:05:34 +01:00
parent 0869afd529
commit 1ad087dc75
5 changed files with 237 additions and 57 deletions
@@ -17,8 +17,9 @@ void CommonFunctions::GenerateMultiSampleTexture(GLuint* texture, int numSamples
{
glDeleteTextures(1, texture);
glGenTextures(1, texture);
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, *texture);
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, numSamples, internalFormat, dimensions.x, dimensions.y, false);
glBindTexture(GL_TEXTURE_2D, *texture);
GLERROR("Texture initialization failed 1");
glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, numSamples, internalFormat, dimensions.x, dimensions.y, GL_FALSE);
GLERROR("Texture initialization failed");
}