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

What is a good way to put background color for codes?

$
0
0

@Koji_Kanao wrote:

I’m generating a shader code and displaying it.
But sometimes it’s not readable, so I would like to put black as a background color for shader code.

code for displaying shader code
shader.begin();
...
ofDrawRectangle(0,0, ofGetWidth(), ofGetHeight());
shader.end();

ofPushMatrix();
ofSetColor(255);
codeFont.drawString(fsCode, ofGetWidth()*.1, ofGetHeight()*.1);
ofPopMatrix();

Could anyone tell me a good way to do that?

Thank you in advance,

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles