This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static ImVec4 color; | |
| color.x = color_backGround.get().r; | |
| color.y = color_backGround.get().g; | |
| color.z = color_backGround.get().b; | |
| color.w = color_backGround.get().a; | |
| // squared box | |
| ImGuiColorEditFlags colorEdiFlags = | |
| ImGuiColorEditFlags_NoSmallPreview | | |
| ImGuiColorEditFlags_NoTooltip | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string filepath = ofToDataPath(""); | |
| igl::readOBJ(filepath + "armadillo.obj", V, F); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //-------------------------------------------------------------- | |
| void ofxFontAnimator::saveWindow() | |
| { | |
| //save window settings | |
| ofWindowSettings AppWindow; | |
| AppWindow.setPosition(glm::vec2(ofGetWindowPositionX(), ofGetWindowPositionY())); | |
| AppWindow.setSize(ofGetWindowSize().x, ofGetWindowSize().y); | |
| AppWindow.windowMode = ofGetCurrentWindow()->getWindowMode(); | |
| ofJson j; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| std::map<std::string, RenderPass::Ptr> passes; | |
| ofxPanel gui; | |
| void toggleListener(const void * sender, bool & value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fontSmall.loadFont("Fonts/DIN.otf", 8 ); | |
| ofxGuiSetFont( "Fonts/DIN.otf", 8 ); | |
| ofxGuiSetDefaultWidth( 260 ); | |
| // -------------------------------- | |
| void draw() | |
| { | |
| // + background | |
| ofBackgroundGradient( ofColor(40,40,40), ofColor(0,0,0), OF_GRADIENT_CIRCULAR); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ofApp::Changed_params(ofAbstractParameter &e) | |
| { | |
| //bool | |
| if (e.type() == typeid(ofParameter<bool>).name()) | |
| { | |
| ofParameter<bool> b = e.cast<bool>(); | |
| if (name == "BANG_1") | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Make vector. | |
| std::vector<ofColor> palette = { ofColor::red }; | |
| // Serialize it. | |
| ofJson json = palette; | |
| // Save it. | |
| ofSaveJson("palette.json", json); | |
| // Load it. | |
| ofJson paletteJson = ofLoadJson("palette.json"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # rm all files | |
| git rm -r --cached . | |
| # add all files as per new .gitignore | |
| git add . | |
| # now, commit for new .gitignore to apply | |
| git commit -m ".gitignore is now working" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // .h | |
| ofParameterGroup params{"Params"}; | |
| void Changed_Params(ofAbstractParameter &e); | |
| bool DISABLE_Callbacks = false; // to avoid callback crashes or to enable only after setup() | |
| // .cpp | |
| // setup() | |
| //params | |
| SHOW_gui.set("SHOW_gui", true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://forum.openframeworks.cc/t/how-do-i-mix-the-alpha-channel-of-one-video-with-another/18771 | |
| ofApp.h file | |
| #pragma once | |
| #include "ofMain.h" | |
| class ofApp : public ofBaseApp{ |
OlderNewer