A problem of GL_RGBA32F_ARB
I am doing mark`s fluid simulator , and i got the result, but there is a problem.
When i close the simulator program , next time i run the program, the fluid is still there, i am very confuse with it. It happen just when i use GL_RGBA32F_ARB and GL_RGBA16F_ARB to create my texture.
When i use GL_RGBA8 ,though the result is not good, next time i run the program the fluid i draw last time won't be here.
Any body have idea what's wrong with my program?
Here is the code of create texture.
Code:
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, _iTextures);
// (set texture parameters here)
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
//create the texture
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA32F_ARB, _iWidth, _iHeight,
0, GL_RGBA, GL_FLOAT, NULL);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement