Fixed allocation of texture buffers resources

This commit is contained in:
David G Yu 2015-05-27 15:23:26 -07:00
parent f4a9a1f431
commit de286e07a6
2 changed files with 2 additions and 0 deletions

View File

@ -189,6 +189,7 @@ struct FVarData
glBufferData(GL_ARRAY_BUFFER, data.size()*sizeof(float),
&data[0], GL_STATIC_DRAW);
glGenTextures(1, &textureBuffer);
glBindTexture(GL_TEXTURE_BUFFER, textureBuffer);
glTexBuffer(GL_TEXTURE_BUFFER, GL_R32F, buffer);
glBindTexture(GL_TEXTURE_BUFFER, 0);

View File

@ -306,6 +306,7 @@ struct FVarData
glBufferData(GL_ARRAY_BUFFER, data.size()*sizeof(float),
&data[0], GL_STATIC_DRAW);
glGenTextures(1, &textureBuffer);
glBindTexture(GL_TEXTURE_BUFFER, textureBuffer);
glTexBuffer(GL_TEXTURE_BUFFER, GL_R32F, buffer);
glBindTexture(GL_TEXTURE_BUFFER, 0);