Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

Framebuffer fbo unknown error

$
0
0

@synchromaStudio wrote:

I really can’t see why this code results in an error. AFAIK I am only beginning and ending a single framebuffer, and the framebuffer is allocated correctly with fbo.allocate(blocks, trackHeight, GL_RGBA);

fbo.begin();

ofClear(0,0,0,0);
ofSetColor(255,255,255,255);
for(j = 0; j < blocks; j++)
{
ofDrawRectangle((float)j, trackHeight * 0.5, 0.0f, 1.0f, trackHeight * 0.5 * upWave[j]);
ofDrawRectangle((float)j, trackHeight * 0.5, 0.0f, 1.0f, trackHeight * 0.5 * dnWave[j]);
}
fbo.end();
fbo.readToPixels(trackPix);

The errors I get are as follows:

[ error ] ofFbo: UNKNOWN ERROR 0
[warning] Framebuffer with id: 0 cannot be bound onto itself.
Most probably you forgot to end() the current framebuffer before calling begin() again or you forgot to allocate() before calling begin().

I can’t see what I am doing wrong here.

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles