Skip to content

Instantly share code, notes, and snippets.

Andrew McWilliams microcosm

View GitHub Profile
View ofApp.cpp
#include "ofApp.h"
/* Begin description
{
//Write your description here
}
End description */
/* Snippet begin */
void ofApp::setup(){
ofSetWindowShape(500, 500);
@microcosm
microcosm / out.txt
Created Apr 16, 2017
OF RPi Cross-compiler output
View out.txt
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0
Compiling OF library for Release
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0
make[1]: Entering directory `/opt/raspberrypi/root/opt/of_v0.9.8_linuxarmv7l_release/libs/openFrameworksCompiled/project'
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0
Compiling /opt/raspberrypi/root/opt/of_v0.9.8_linuxarmv7l_release/libs/openFrameworks/types/ofColor.cpp
/opt/cross/bin/arm-linux-gnueabihf-g++ -O3 -DNDEBUG -Wall -std=c++11 -march=armv7-a -mfpu=vfp -mfloat-abi=hard -fPIC -ftree-vectorize -Wno-psabi -pipe --sysroot=/opt/raspberrypi/root -DOF_USIN
View soundPlayerExample-make-run.txt
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0 libmpg123
[warning] ofInit: Couldn't set UTF-8 locale, string manipulation functions
won't work correctly for non ansi characters unless you specify a UTF-8 locale
manually using std::locale::global(std::locale("locale"))
available locales can be queried with 'locale -a' in a terminal.
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1600x1200
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1024x768
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set 0x1
View audioOutputExample-make.txt
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0 libmpg123
Compiling OF library for Release
make[1]: Entering directory '/home/pi/of_v0.9.7_linuxarmv7l/libs/openFrameworksCompiled/project'
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0 libmpg123
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0 libmpg123
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0 libmpg123
View midi-sync.cpp
bool playing;
void setup() {
playing = false;
float bpm = 50;
clock.setBpm(bpm * 24); //24 ppqn https://en.wikipedia.org/wiki/MIDI_beat_clock
ofAddListener(clock.beatEvent, this, &ofApp::tick);
}
void ofApp::tick(void){
@microcosm
microcosm / main.cpp
Created Nov 6, 2014
multi monitors test
View main.cpp
#include "ofMain.h"
#include "ofApp.h"
#include "ofAppGLFWWindow.h"
int main( ){
ofAppGLFWWindow window;
window.setMultiDisplayFullscreen(true);
ofSetupOpenGL(&window,1024,768,OF_FULLSCREEN);
ofRunApp(new ofApp());
}
View of-texture-tiling-win.cpp
ofImage img;
ofTexture texture;
ofPlanePrimitive plane;
float tx0, ty0, tx1, ty1;
void ofApp::setup(){
ofDisableArbTex();
img.loadImage("test.jpg");
texture = img.getTextureReference();
texture.setTextureWrap(GL_REPEAT, GL_REPEAT);
View of-texture-tiling-fail.cpp
ofImage img;
ofTexture texture;
ofPlanePrimitive plane;
float tx0, ty0, tx1, ty1;
void ofApp::setup(){
ofDisableArbTex(); //Removing this line allows npot textures to work fine
img.loadImage("test.jpg");
texture = img.getTextureReference();
texture.setTextureWrap(GL_REPEAT, GL_REPEAT);
You can’t perform that action at this time.