Open stephanschulz opened 6 years ago
There's nothing wrong in practice with your code - FBOs used to have the same interface as textures in 0.8.x, but for 0.9.x oF has changed their interface, and this means the round-trip is needed for now. The multiple-buffer work I'm preparing should fix this and enable direct usage of the FBO object.
Issue #4 is pretty similar to this, and I should be able to resolve it soon.
Cheers!
I found the solution. When you allocate fbo, you need to disable arbtex
ofDisableArbTex();
fbo.allocate(1024, 768, GL_RGBA32F);
or you can
ofFboSettings fs;
fs.width = 1024;
fs.height = 768;
fs.internalformat = GL_RGBA32F;
fs.textureTarget = GL_TEXTURE_2D;
fbo.allocate(fs);
it's me again.
I was successful loading an image in to my polarGrid example inside setup().
I am now trying to generate an ofFbo and pass it's texture to the shader during update(). But it's always black. If I do the work around as in the below code things work. But it seems silly to have to pass FBO to pix, to tex.
Ideally I would be able to just call mainFbo.getTexture()
Any ideas what I am doing wrong?