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
// http://marina.sys.wakayama-u.ac.jp/~tokoi/?date=20110221 | |
inline void billboard() | |
{ | |
GLfloat m[16]; | |
glGetFloatv(GL_MODELVIEW_MATRIX, m); | |
float inv_len; | |
m[8] = -m[12]; |
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
Google ja: | |
http://www.google.com/search?lr=lang_ja&q=%s | |
Google en: | |
http://www.google.com/search?lr=lang_en&q=%s | |
oF forum: | |
http://www.google.com/search?sitesearch=http%3A%2F%2Fforum.openframeworks.cc&q=%s | |
C++ reference: | |
http://www.google.com/search?sitesearch=http%3A%2F%2Fwww.cppreference.com/wiki/&q=%s | |
C++ reference(ja): | |
http://www.google.com/search?sitesearch=http%3A%2F%2Fwww.cppreference.com/wiki/jp/&q=%s |
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
#!/usr/bin/env python | |
''' | |
DEPENDENCIES: | |
$ brew install ffmpeg | |
$ brew install imagemagick | |
$ python ./mov2gif.py input.mov output.gif 15 | |
''' |
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
#include <zlib.h> | |
bool zcompress(const string& input, string& output) | |
{ | |
z_stream z; | |
z.zalloc = Z_NULL; | |
z.zfree = Z_NULL; | |
z.opaque = Z_NULL; |
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
.svn | |
.hg | |
.cvs | |
# osx | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
Icon | |
*.app |
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 once | |
/* | |
USAGE: | |
ofxAutoSaveParam param; | |
class ofApp { | |
public: |
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 once | |
#include <sys/stat.h> | |
#include "ofMain.h" | |
class Mmap | |
{ | |
public: | |
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
float getCurrentFov() | |
{ | |
GLfloat m[16]; | |
GLint viewport[4]; | |
glGetFloatv(GL_PROJECTION_MATRIX, m); | |
glGetIntegerv(GL_VIEWPORT, viewport); | |
float aspect = (float)viewport[2] / viewport[3]; |
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 once | |
#include "ofMain.h" | |
class Spectrum | |
{ | |
public: | |
Spectrum() : buffer_size(100), x_scale(0.001) {} | |
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
#!/bin/sh | |
/usr/bin/osascript -e 'tell application "Finder" to get POSIX path of (target of window 1 as string)' |
NewerOlder