Skip to content

Instantly share code, notes, and snippets.

@roxlu
roxlu / HeightField.cpp
Created December 23, 2013 16:51
Water Simulation
#include "HeightField.h"
HeightField::HeightField()
:vert(0)
,frag(0)
,prog(0)
,vao(0)
,vbo_els(0)
,vbo(0)
,fbo(0)
@roxlu
roxlu / HeightField.cpp
Created December 23, 2013 13:20
Water simulation, Heigh Field sim on GPU + flow field GPU
#include "HeightField.h"
HeightField::HeightField()
:vert(0)
,frag(0)
,prog(0)
,vao(0)
,vbo_els(0)
,vbo(0)
,fbo(0)
@roxlu
roxlu / README.txt
Created December 11, 2013 14:18
Compile Apache, PHP and MySQL on Mac
COMPILE APACHE / PHP / MYSQL
===========================
- First compile/install apache, see compile_apache.sh for more info
- Then compile/install php/mysql, see compile_php.sh for more info
- Tested on Mac OSX 10.8, 2013.01.15
@roxlu
roxlu / Shaders.h
Created December 9, 2013 13:37
Mac 10.9 using YUV input with opengl
#ifndef PHOTOBOOTH_SHADERS_H
#define PHOTOBOOTH_SHADERS_H
#include <opengl/Headers.h>
#include <math/Math.h>
// --------------------------------------------------
static const char* P_VS = ""
"#version 150\n"
"uniform mat4 u_pm;"
@roxlu
roxlu / Spline.h
Created December 4, 2013 17:35
Catmull Rom spline interpolation
#ifndef ROXLU_SPLINEH
#define ROXLU_SPLINEH
#include <vector>
/**
* Catmull Rom interpolation.
* --------------------------
* Catmull Rom interpolation works with 4 points, there the
* local "t" value is used to interpolate between points B and C. The
@roxlu
roxlu / tinylib.h
Last active July 24, 2019 15:22
Tinylib - the most basic features for easy graphics development with GL
/*
--------------------------------------------------------------------------------
oooo
`888
oooo d8b .ooooo. oooo ooo 888 oooo oooo
`888""8P d88' `88b `88b..8P' 888 `888 `888
888 888 888 Y888' 888 888 888
888 888 888 .o8"'88b 888 888 888
@roxlu
roxlu / ofxLinkDeck.cpp
Created October 11, 2013 20:07
ofxLinkDeck
#include <ofxLinkDeck/ofxLinkDeck.h>
#include <iostream>
//#include <libyuv/libyuv.h>
ofxLinkDeck::ofxLinkDeck()
:pixel_format(0)
,display_mode(0)
,pixels(NULL)
,w(0)
@roxlu
roxlu / testApp.cpp
Created October 11, 2013 20:06
Example of how to use the ofxLinkDeck addon to interface a decklink capture card.
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
ldeck.listDevices();
// ldeck.setup(0, bmdModePAL, bmdFormat8BitYUV);
if(!ldeck.setup(0, bmdFormat8BitYUV, bmdModePAL)) {
printf("error: cannot get decklink setup.\n");
::exit(EXIT_FAILURE);
@roxlu
roxlu / main.cpp
Last active December 24, 2015 04:49
YUV shader (I420p)
extern "C" {
# include <uv.h>
}
#include <iostream>
#include <streamer/videostreamer/VideoStreamer.h>
#include <decklink/DeckLink.h>
#include <libyuv/libyuv.h>
#include <tinylib/tinylib.h>
#include <GLXW/glxw.h>
#include <GLFW/glfw3.h>
@roxlu
roxlu / results.log
Last active December 24, 2015 02:39
Libyuv I422 to I420 conversion performance
Motherboard: Gigabyte GA-Z77-D3H
CPU: Intel® Core™ i5-3570K Processor
CPU cooler: Cythe Mugen 3 processor koeler
GPU: ASUS GeForce GTX670-DC2G-4GD5 - 4GB - PCI-E
RAM: Corsair 16GB 1600MHz CL10 DDR3
Casing: Corsair Carbide 300R
PSU: Corsair CX600 Builder series - 600W
HDD: Seagate 1TB 3.5" SATA-600 7200rpm 32MB
SSD: Samsung 840 Series 250GB 2.5" SATA600