Skip to content

Instantly share code, notes, and snippets.

View danzeeeman's full-sized avatar

Dan Moore danzeeeman

View GitHub Profile
@danzeeeman
danzeeeman / gist:11193283
Created April 22, 2014 20:32
sphere dots shader
#version 120
#define PI (3.1415926536)
#define TWO_PI (6.2831853072)
uniform sampler2DRect bumpmap;
uniform float elapsedTime;
varying vec2 TexCoord;
varying vec3 normal;
varying vec3 pos;
@danzeeeman
danzeeeman / gist:11196332
Created April 22, 2014 22:17
I like this frag
#version 120
#define PI (3.1415926536)
#define TWO_PI (6.2831853072)
uniform sampler2DRect bumpmap;
uniform float elapsedTime;
varying vec2 TexCoord;
varying vec3 normal;
varying vec3 pos;
@danzeeeman
danzeeeman / gist:b0b1a2a5174f7da45d0a
Last active August 29, 2015 14:05
AlphaTest for openGL ES2
alphatest.frag
=======
precision highp float;
uniform sampler2D tex0;
uniform float alpha;
varying vec2 texCoordVarying;
void main()
{
@danzeeeman
danzeeeman / gist:de595ace719adf687322
Created January 12, 2015 15:17
config.txt for 2.8 PiTFT
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#! /bin/bash
VBR="2500k" # Bitrate
FPS="30" # FPS
QUAL="medium" # Quality
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL
SOURCE="udp://239.255.139.0:1234" # Source
KEY="XXXX.XXXXXXX" # Event (from youtube)
@danzeeeman
danzeeeman / gist:9a69a8a39d3740958f9a
Last active August 29, 2015 14:24
OF Calls to reposition an app to the second display after a screen failure
bool resetScreen;
FadeTimer resetScreenDelay; //from ofxTiming by @kylemcdonald -> https://github.com/kylemcdonald/ofxTiming
void ofApp::setup(){
....
resetScreenDelay.setLength(3.0, 0.0);
resetScreen = false;
}
void ofApp::update(){
I/REMOVE BEFORE COMMIT(30873): OFAndroidViewGrabber getInstance: 0
I/REMOVE BEFORE COMMIT(30873): OFAndroidViewGrabber initGrabber: w: 320 h: 240 targetFPS: -1
I/REMOVE BEFORE COMMIT(30873): OFAndroidViewGrabber else:
W/InputMethodManagerService( 306): Got RemoteException sending setActive(false) notification to pid 30773 uid 10077
V/OF (30873): Camera 0 facing: 0
V/OF (30873): Camera 1 facing: 1
I/CameraService( 126): Opening camera 0
I/CameraHAL( 126): camera_device open
I/ActivityManager( 306): Displayed cc.openframeworks.androidCameraExample/.OFActivity: +478ms
I/AwesomePlayer( 126): setDataSource_l('/system/media/audio/ui/camera_click.ogg')
D/AndroidRuntime(12902): Shutting down VM
W/dalvikvm(12902): threadid=1: thread exiting with uncaught exception (group=0x40a621f8)
E/AndroidRuntime(12902): FATAL EXCEPTION: main
E/AndroidRuntime(12902): java.lang.RuntimeException: Method called after release()
E/AndroidRuntime(12902): at android.hardware.Camera.setPreviewDisplay(Native Method)
E/AndroidRuntime(12902): at android.hardware.Camera.setPreviewDisplay(Camera.java:405)
E/AndroidRuntime(12902): at cc.openframeworks.OFAndroidVideoGrabber$CameraPreview.surfaceCreated(OFAndroidVideoGrabber.java:351)
E/AndroidRuntime(12902): at android.view.SurfaceView.updateWindow(SurfaceView.java:533)
E/AndroidRuntime(12902): at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:226)
E/AndroidRuntime(12902): at android.view.View.dispatchWindowVisibilityChanged(View.java:5839)
---PROJECT_ADDONS---
ofxRaspberryPi
--------------------
linking bin/soundPlayerExample for linuxarmv6l
mkdir -p bin
g++ -o bin/soundPlayerExample obj/Linuxarmv6lRelease/src/testApp.o obj/Linuxarmv6lRelease/src/main.o -Wl,-rpath=./libs -L../../../libs/freetype/lib/linuxarmv6l -L../../../libs/kiss/lib/linuxarmv6l -L../../../libs/poco/lib/linuxarmv6l -L../../../libs/tess2/lib/linuxarmv6l -L/opt/vc/lib ../../../libs/openFrameworksCompiled/lib/linuxarmv6l/libopenFrameworks.a -ludev -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lGLESv2 -lEGL -lfreeimage -lportaudio ../../../libs/freetype/lib/linuxarmv6l/libfreetype.a ../../../libs/kiss/lib/linuxarmv6l/libkiss.a ../../../libs/tess2/lib/linuxarmv6l/libtess2.a ../../../libs/poco/lib/linuxarmv6l/libPocoNet.a ../../../libs/poco/lib/linuxarmv6l/libPocoXML.a ../../../libs/poco/lib/linuxarmv6l/libPocoUtil.a ../../../libs/poco/lib/linuxarmv6l/libPocoFoundation.a -pthread -lcairo -lz -lgstapp-0.10 -lgstvideo-0.10 -lgstbase-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.
..has a lean and hungry look.
He thinks too much.
Such men are dangerous.
from JULIUS CAESAR
-william shakespeare