i create a float pbuffer (32 bit for component), then i create an empty float texture (on ati, i’m following your suggestion):
Then in the main loop:
- switch context;
- render something;
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0,width, height); (on the float texture)
- switch to main context;
- bind float texture and draw something.
Is this method correct? if i don’t use a float texture all function correctly, with float texture not.
Are you using shaders? You should.
no, i’m not using shaders, before doing it i’d like simply make a rendering to a float texture and visualize it, is my method correct?
i might be wrong but i think you can only render to a fp pbuffer if you are using a fragment shader/program/whatever… guess thats what the previous poster is also implying
ok, now this is what i’m doing:
- create a float pbuffer (32 bit for component);
- create a normal pbuffer (8 bit for component);
- create an empty float texture:
- render something on float pbuffer;
- copy to float texture with
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0,width, height);
- with this float texture render another cube on the other pbuffer and take a normal texture;
- then apply this texture on a cube in the main context.
Results are that the first passage gives me a white texture, if i use normal texture it’s all ok, if i use a float texture in the second passage frame rate goes down and i don’t see anything on screen. I’m using Ati card. I don’t use filtering for float texture.
Thank you very much.
ok, this method functions, i’m dummy, i apologies,i was creating a 0x0 texture, sorry, sorry…