This file contains 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
ofAddListener(someEvent, static_cast<SuperClass*>(&subClass), &SuperClass::foo); |
This file contains 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
sampler2D : normalized texture coordinates (0..1, 0..1) | |
sampler2DRect : unnormalized texture coordinates (0..w, 0..h) |
This file contains 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 FileSync::scanAllFile(ofDirectory dir, vector<string>* filelist) | |
{ | |
dir.sort(); | |
for (int i = 0; i < dir.size(); i++) | |
{ | |
if (dir.getFile(i).isDirectory()) | |
{ | |
ofDirectory newDir; | |
newDir.open(dir.getFile(i).getAbsolutePath()); | |
newDir.listDir(); |
This file contains 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
struct tm* ofApp::getModifiedTimeStruct(string filePath) | |
{ | |
struct tm* rtn; | |
struct stat attrib; | |
stat(filePath.c_str(), &attrib); | |
rtn = gmtime(&(attrib.st_mtime)); | |
return rtn; | |
} | |
bool ofApp::isModified(struct tm* lastSyncTime, struct tm* tgtFileLastModifiedTime) |
This file contains 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
1. use ofxTransparentWindow to make it invisible https://github.com/jefftimesten/ofxTransparentWindow | |
2. on openFrameworks-Info.plist | |
- set "Application is background only”(LSBackgroundOnly) to "YES" to make it always background |
This file contains 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
afp://Makira%20%E3%81%AE%20iMac._afpovertcp._tcp.local | |
tell application "Finder" | |
mount volume "smb://makira:doraemon@192.168.0.3/makira" | |
end tell | |
tell application "Finder" | |
mount volume "afp://Makira%20%E3%81%AE%20iMac._afpovertcp._tcp.local/makira" | |
end tell |
This file contains 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
// | |
// VolumeMounter.h | |
// ・:,。゚・:,。★゚・:,。゚・:,。☆゚・:,。゚・:,。 | |
// | |
// Created by Akira on 4/6/15. | |
// | |
// | |
#pragma once |
This file contains 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 ofPoint getCircularRdmPos(float pRadius, ofPoint orig, bool bUniDist = false) | |
{ | |
float angle = ofRandomuf() * PI * 2; | |
float radius = 0.0; | |
if (bUniDist) | |
{ | |
radius = sqrt(ofRandomuf()) * pRadius; | |
} | |
else |
This file contains 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
#pragma include "../common/header.glsl" | |
#pragma include "../common/defaultVertIn.glsl" | |
uniform float uAngle; | |
out VSOUT | |
{ | |
vec2 texCoord; | |
} vsout; |
This file contains 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
glEnable(GL_POLYGON_SMOOTH); | |
glEnable(GL_LIGHTING); | |
glEnable(GL_LIGHT0); | |
glEnable(GL_DEPTH_TEST); | |
glEnable(GL_NORMALIZE); | |
glEnable(GL_COLOR_MATERIAL); | |
glDisable(GL_BLEND); | |
glPolygonMode(GL_BACK, GL_FILL ); | |
glEnable(GL_CULL_FACE); |
OlderNewer