Skip to content

Instantly share code, notes, and snippets.

View tgfrerer's full-sized avatar

Tim Gfrerer tgfrerer

View GitHub Profile
@tgfrerer
tgfrerer / compile_log.txt
Last active February 5, 2016 12:37
testcase for oF lambda events
1>------ Build started: Project: testEventListener, Configuration: Debug Win32 ------
1> main.cpp
1>c:\users\tim\documents\developer\of\libs\openframeworks\events\ofEvent.h(441): error C2668: 'ofEvent<ofMouseEventArgs,std::recursive_mutex>::make_function': ambiguous call to overloaded function
1> c:\users\tim\documents\developer\of\libs\openframeworks\events\ofEvent.h(398): note: could be 'std::shared_ptr<of::priv::Function<T,Mutex>> ofEvent<T,Mutex>::make_function(of::priv::BaseEvent<of::priv::Function<T,Mutex>,Mutex>::check_function<void (const void *,T &)>,int)'
1> with
1> [
1> T=ofMouseEventArgs,
1> Mutex=std::recursive_mutex
1> ]
1> c:\users\tim\documents\developer\of\libs\openframeworks\events\ofEvent.h(394): note: or 'std::shared_ptr<of::priv::Function<T,Mutex>> ofEvent<T,Mutex>::make_function(of::priv::BaseEvent<of::priv::Function<T,Mutex>,Mutex>::check_function<void (T &)>,int)'
@tgfrerer
tgfrerer / output
Last active October 15, 2015 09:48
Testing the construction / destruction order of cpp objects.
construct: a
construct: b
destruct: a
@tgfrerer
tgfrerer / main.cpp
Created August 24, 2015 22:03
test case for include parser for ofShader PR
//
// main.cpp
// testTokenise
//
// Created by tgfrerer on 23/08/2015.
// Copyright © 2015 pal. All rights reserved.
//
#include <iostream>
#include <string>
@tgfrerer
tgfrerer / utils.glsl
Last active August 29, 2015 14:24
utility methods for GLSL
// ------------------------------------------------------------
// Math
// ------------------------------------------------------------
float map(in float val_, in float range_min_, in float range_max_, in float min_, in float max_){
return ( min_ + ((max_ - min_)/(range_max_ - range_min_)) * clamp(val_, range_min_, range_max_));
}
vec2 map(in vec2 val_, in vec2 range_min_, in vec2 range_max_, in vec2 min_, in vec2 max_){
return ( min_ + ((max_ - min_)/(range_max_ - range_min_)) * clamp(val_, range_min_, range_max_));
Generating code
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(512): warning C4799: function 'is_opaque' has no EMMS instruction
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(501): warning C4799: function 'is_equal' has no EMMS instruction
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(586): warning C4799: function 'expand_4xpacked565' has no EMMS instruction
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(284): warning C4799: function 'to_uint64' has no EMMS instruction
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(518): warning C4799: function 'is_zero' has no EMMS instruction
1>c:\users\dominic\desktop\openframeworks\scripts\apothecary\build\cairo-vs\pixman\pixman\pixman-mmx.c(490): warning C4799: function 'store8888' has no EMMS
@tgfrerer
tgfrerer / gist:77cbd9e2a60acc95ee1f
Created June 18, 2015 12:01
keypress oF testcase
#include "ofMain.h"
class ofApp : public ofBaseApp {
public:
void keyPressed(int key) {
ofLogNotice() << "key press : " << std::setw(3) << key;
};
@tgfrerer
tgfrerer / main.cpp
Created April 7, 2015 10:33
Minimal test case for issue #3747
#include "ofMain.h"
class ofApp : public ofBaseApp{
ofVboMesh testMesh;
ofEasyCam mCam1;
public:
@tgfrerer
tgfrerer / main.cpp
Created January 31, 2015 01:01
test project for #3598
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
ofFbo mFbo;
ofFbo mFbo1;
ofFbo mFbo2;
#include "ofMain.h"
class ofApp : public ofBaseApp{
ofMesh box;
public:
void setup(){
box = ofBoxPrimitive().getMesh();
};
@tgfrerer
tgfrerer / main.cpp
Created October 2, 2014 16:08
opengl optimisations testcase
#include "ofMain.h"
class ofApp : public ofBaseApp{
ofVboMesh mMshSphere;
ofCamera mCam1;
public:
void setup(){