Skip to content

Commit

Permalink
OMXPlayer alpha now using ofSetColor() since it is now texture
Browse files Browse the repository at this point in the history
and no longer direct mode
  • Loading branch information
nununo committed Apr 25, 2017
1 parent 2543e8c commit 1045e2e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/data/vela.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<input type="autoFlicker" enabled="0">
<minPeriod>10000</minPeriod>
</input>
<input type="arduino" enabled="1" calibrated="1">
<input type="arduino" enabled="0" calibrated="1">
<devices>
<device name="mac">cu.usbmodem1421</device>
<device name="pi">/dev/ttyUSB0</device>
Expand Down
14 changes: 8 additions & 6 deletions src/MovieOMXPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MovieOMXPlayer::MovieOMXPlayer(string _filename, bool loop) {
ofxOMXPlayerSettings settings;
settings.videoPath = filename;
settings.useHDMIForAudio = true; //default true
settings.enableTexture = false; //default true
settings.enableTexture = true; //default true
settings.enableLooping = loop; //default true
settings.enableAudio = false; //default true, save resources by disabling

Expand All @@ -29,19 +29,21 @@ MovieOMXPlayer::MovieOMXPlayer(string _filename, bool loop) {

//--------------------------------------------------------------
void MovieOMXPlayer::draw(float x, float y, float width, float height) {
/*
if (alpha == ALPHA_MAX)

ofPushStyle();

if (getAlpha() == ALPHA_MAX)
ofDisableAlphaBlending();
else
ofEnableAlphaBlending();

//ofSetColor(ofColor::white);
ofSetColor(255,255,255,getAlpha());

movie.setAlpha(alpha);
movie.draw(x, y, width, height);

ofDisableAlphaBlending();
*/

ofPopStyle();
}

#endif

0 comments on commit 1045e2e

Please sign in to comment.