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

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

$
0
0

@yutatoga wrote:

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();

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles