Sign in to follow this  
kobefeng123

A problem of GL_RGBA32F_ARB

Recommended Posts

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[i]); // (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);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this