Skip to content

Instantly share code, notes, and snippets.

View roymacdonald's full-sized avatar

Roy Macdonald roymacdonald

View GitHub Profile
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
ofRectangle viewport;
bool bUseOrtho, bUseCamera;
ofCamera cam;
//--------------------------------------------------------------
@roymacdonald
roymacdonald / gist:c6c83faea3a6ef7278e6
Created July 8, 2015 21:16
Max vertices rendering test three.js.
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js webgl - materials - wireframe</title>
<meta charset="utf-8">
<style>
body {
background:#000;
color:#fff;
padding:0;
@roymacdonald
roymacdonald / gist:265654a165334aa7e498
Created July 8, 2015 21:24
Max vertices rendering test openFrameworks
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
ofVboMesh mesh;
int resolution;
int numVertices;
ofEasyCam cam;
//--------------------------------------------------------------
void setup(){
@roymacdonald
roymacdonald / main.cpp
Created July 8, 2015 22:08
Level of detail mesh max vertices test for openFrameworks. All the code is inside the main.cpp file
#include "ofMain.h"
class LODMeshInstanced{
public:
ofVboMesh tile;
ofShader* shader;
int levels, totalWidth, resolution, numTiles;
vector<ofVec3f>tilePositions;
vector<float>tileScale;
@roymacdonald
roymacdonald / LODTest.html
Created July 8, 2015 22:27
Level of detail mesh max vertices test for three.js. just download file and run on browser. It will download the needed libs
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js webgl - materials - wireframe</title>
<meta charset="utf-8">
<style>
body {
background:#000;
color:#fff;
padding:0;
@roymacdonald
roymacdonald / main.cpp
Created August 13, 2015 03:36
Test for openFrameworks fix-ofNodeOrbit
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
@roymacdonald
roymacdonald / ofApp.cpp
Created August 25, 2015 04:19
openframeworks audio pasthrough
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
int bufferSize = 256;
ofSoundStreamSetup(2, 2, this, 44100, bufferSize, 4);
}
@roymacdonald
roymacdonald / board.svg
Last active September 30, 2015 22:32
Test
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roymacdonald
roymacdonald / ofApp.h
Last active February 25, 2016 17:50
Testing ofDrawBitmapString bounding box
#pragma once
#include "ofMain.h"
class ofApp : public ofBaseApp{
public:
void setup(){
mode = OF_BITMAPMODE_SIMPLE;
clic.set(200,200);
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.