A problem of GL_RGBA32F_ARB

Started by
1 comment, last by kobefeng123 14 years, 3 months ago
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);
Advertisement
You are doing render-to-texture? If so, are you clearing before drawing anything?
yes, i clear every buffer when i start, and i run this program in ATI card, it won't happen this situation, i am so confuse.

This topic is closed to new replies.

Advertisement