Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void testApp::draw(){
- tex1.begin();
- if(bNoise==false)
- {
- ofSetHexColor(0xFFFFFF);
- ofFill();
- ofCircle(ofGetWidth()/2, ofGetHeight()/2, ofGetHeight()/2);
- ofSetHexColor(0x0000FF);
- ofFill();
- ofCircle(xWords, yWords, ofGetHeight()/6);
- ofSetHexColor(0x000000);
- ofFill();
- ofCircle(xWords, yWords, ofGetHeight()/10);
- }
- else
- {
- ofSetHexColor(0x000000);
- ofFill();
- ofCircle(ofGetWidth()/2, ofGetHeight()/2, ofGetHeight()/2);
- ofSetHexColor(0xFF0000);
- ofFill();
- ofCircle(xWords, yWords, ofGetHeight()/6);
- ofSetHexColor(0x110000);
- ofFill();
- ofCircle(xWords, yWords, ofGetHeight()/8);
- }
- tex1.end();
- ofEnableNormalizedTexCoords();
- tex1.bind();
- fishShader.begin();
- fishShader.setUniformTexture("tex0", tex1, 0);
- fishShader.setUniform1f("signcurvature", curvature);
- fishShader.setUniform1f("lensradius", radius);
- ofPushMatrix();
- ofTranslate(320, 240);
- glBegin(GL_QUADS);
- glTexCoord2f(0,0); glVertex3f(0,0,0);
- glTexCoord2f(1,0); glVertex3f(320,0,0);
- glTexCoord2f(1,1); glVertex3f(320,240,0);
- glTexCoord2f(0,1); glVertex3f(0,240,0);
- glEnd();
- ofPopMatrix();
- fishShader.end();
- tex1.unbind();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement