Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

grabScreen vs loadScreenData vs ofFbo

$
0
0

@cuinjune wrote:

Hi, I wonder what is the difference between ofImage.grabScreen and ofTexture.loadScreenData.

I see no difference between

img.grabScreen(300, 300, 200, 200);
img.draw(0,0);

and

img.getTexture().allocate(200, 200, GL_RGBA);
img.getTexture().loadScreenData(300, 300, 200, 200);
img.getTexture().draw(0, 0);

both of them showed the same result.
But the second one was more efficient than the first one.
Then why do we need grabScreen and when to use it if it's slower than loadScreenData?

Also, ofFbo can achieve the same thing using fbo.begin() and fbo.end().
Performance wise, using fbo was faster than grabScreen and similar to loadScreenData.
I would like to know what are ofFbo's advantage/disadvantage compared to these two.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Latest Images

Trending Articles



Latest Images