Skip to content

Instantly share code, notes, and snippets.

@satoruhiga
satoruhiga / configure_osx_32bit
Last active April 3, 2016 14:45
configure_osx_32bit
#!/bin/bash
ARCH="-arch i386"
SDK="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
SDKLIB="-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
export MACOSX_DEPLOYMENT_TARGET="10.7"
export CFLAGS="$ARCH $SDK -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
@satoruhiga
satoruhiga / BAD_TUNE_TV.fs
Last active April 3, 2016 14:43
BAD_TUNE_TV.fs
/*{
"DESCRIPTION": "BAD_TUNE_TV",
"CREDIT": "by satoruhiga",
"CATEGORIES": [
"GLSL FX"
],
"INPUTS": [
{
"NAME": "inputImage",
"TYPE": "image"
@satoruhiga
satoruhiga / stack_blur.h
Last active April 3, 2016 14:43
stack_blur.h
#include "ofMain.h"
namespace stack_blur {
template<class T> struct stack_blur_tables {
static uint16_t const g_stack_blur8_mul[255];
static uint8_t const g_stack_blur8_shr[255];
};
//------------------------------------------------------------------------
@satoruhiga
satoruhiga / ofxDelayLineQueue.h
Last active April 3, 2016 14:38
ofxDelayLineQueue.h
#pragma once
#include <chrono>
#include <deque>
template <typename T>
class ofxDelayLineQueue
{
public:
#pragma once
#include "ofMain.h"
class NoiseCircle
{
public:
float noise_amt;
float noise_speed;
@satoruhiga
satoruhiga / ofxOscMultiSender.h
Created August 29, 2013 11:49
ofxOscMultiSender.h
#pragma once
#include "ofxOsc.h"
class ofxOscMultiSender
{
public:
void setup(std::string hostname, int port)
{
@satoruhiga
satoruhiga / PixelPreview.hpp
Created May 21, 2013 08:30
Tile layouted image preview
#pragma once
#include "ofMain.h"
class PixelPreview
{
struct Panel
{
typedef ofPtr<Panel> Ref;
@satoruhiga
satoruhiga / TimedomainMedianFilter.hpp
Created May 8, 2013 18:44
TimedomainMedianFilter
#pragma once
#include "ofMain.h"
template <typename T>
class TimedomainMedianFilter
{
public:
TimedomainMedianFilter() : num_frame_buffer(5), current_frame_index(0) {}
@satoruhiga
satoruhiga / testApp.cpp
Created February 5, 2013 12:36
PerspectivePoint
#include "testApp.h"
ofMesh points;
ofEasyCam cam;
bool use_perspective_point = true;
void enablePerspectivePoint(float size)
{
static GLfloat distance[] = { 0.0, 0.0, 1.0 };
glPointParameterfv(GL_POINT_DISTANCE_ATTENUATION, distance);
@satoruhiga
satoruhiga / utf8string2wstring.cpp
Created September 6, 2011 10:13
utf8string2wstring.cpp
#include <iconv.h>
#include <string>
int convert(string input, wstring &output)
{
char *inbuf, *iptr, *outbuf, *wptr;
iconv_t cd;
size_t nconv, inlen, avail;