Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Alpha channel(transparency) is not working? Transparent ellipse completely masks a box

$
0
0

I don't know why the orange box is masked by the transparent ellipse, please see the GIF below. How can I prevent the orange box from being masked?

oF of_v0.9.0_osx_release
Mac OS 10.10.5
Xcode 6.4


in ofApp::draw()

ofPushMatrix();
ofEnableDepthTest();
ofTranslate(ofGetWidth()/2, ofGetHeight()/2, 0);
ofRotateY(mouseX);

ofSetColor(ofColor::yellow);
ofDrawBox(0, 0, -50, 10, 10, 10);
ofSetColor(255);

ofSetColor(255, 0, 0, 10);
ofDrawEllipse(0, 0, 0, 100, 100);
ofSetColor(255);

ofSetColor(ofColor::orange);
ofDrawBox(0, 0, 50, 10, 10, 10);
ofSetColor(255);

ofDisableDepthTest();
ofPopMatrix();

Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>