/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
&& brew update
&& brew install qemu
export QEMU=$(which qemu-system-arm)
brew install wget
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
echo -ne "\xf0\x7d\x17\x00\x00\x02\x00\x00\xf7" > test.syx |
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
#ifndef _EASING_INCLUDED_ | |
#define _EASING_INCLUDED_ | |
float ease_linear(float x) { | |
return x; | |
} | |
float ease_in_quad(float x) { | |
float t = x; float b = 0; float c = 1; float d = 1; | |
return c*(t/=d)*t + b; |
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
#ifndef __QUATERNION_INCLUDED__ | |
#define __QUATERNION_INCLUDED__ | |
#define QUATERNION_IDENTITY float4(0, 0, 0, 1) | |
#ifndef PI | |
#define PI 3.14159265359f | |
#endif | |
// Quaternion multiplication |
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
#ifndef __MATRIX_INCLUDED__ | |
#define __MATRIX_INCLUDED__ | |
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) | |
float4x4 inverse(float4x4 m) { | |
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0]; | |
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1]; | |
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2]; | |
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][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
Shader "StandardDoubleSide" | |
{ | |
Properties | |
{ | |
_Color("Color", Color) = (1,1,1,1) | |
_MainTex("Albedo", 2D) = "white" {} | |
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 | |
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5 |
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
vec3 getNormal(vec3 p){ | |
//sampling around the point | |
vec2 e = vec2(0.01, 0.0); | |
float d = map(p); | |
vec3 n = d - vec3( | |
map(p-e.xyy), | |
map(p-e.yxy), | |
map(p-e.yyx)); | |
return normalize(n); | |
} |
//originally from https://github.com/jmwohl/sfpc/blob/master/C%2B%2B/Using%20Sublime%20for%20C%2B%2B%20and%20openFrameworks.md
Two things I knew were going to be important to me: smart code hinting and completion, and auto formatting. Thankfully other folks had already solved these problems for me via a couple handy packages:
1) SublimeAStyleFormatter - for auto formatting
2) EasyClangComplete - for code completion
- SublimeLinter and SublimeLinter-contrib-clang - for error checks
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
//from simon geilfus: https://github.com/simongeilfus/FlyingTokyo19 | |
//Pass an argument by value when it is a built-in type or a small object (Passing by value makes a copy of the object) : | |
void firstFunction( int number, bool boolean ); | |
//Pass an argument by reference when you want the argument to be read-write: | |
void secondFunction( Rectf &rectangle ); | |
//Pass an argument by const reference when you want the argument to be read-only (Read-only also ensure that your data won't be unecessarely copied when calling the function): | |
void thirdFunction( const vector<gl::Texture> &textures ); |
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
//created by jvcleave | |
//edited by Thomas Van Ta | |
//openFrameworks 0.8-0.9 main.cpp | |
#include "ofMain.h" | |
#include "ofApp.h" | |
#if (OF_VERSION_MINOR != 9) && defined(TARGET_OPENGLES) | |
#include "ofGLProgrammableRenderer.h" | |
#endif |
NewerOlder