Skip to content

Instantly share code, notes, and snippets.

@jvcleave
jvcleave / FPSLogger.h
Created July 1, 2013 08:56
FPS Logger
#pragma once
#include "ofMain.h"
class FPSLogger
{
public:
int numSamples;
@jvcleave
jvcleave / gist:6284793
Created August 20, 2013 17:50
system call for windows app
system("\"\"C:\\Program Files (x86)\\FOLDER\\APP.exe\"");
@jvcleave
jvcleave / gist:6512123
Created September 10, 2013 16:43
asus
void testApp::setup(){
context.setupUsingXMLFile(ofToDataPath("openni/config/asus.xml", true));
//contents of bin/data/openni/config/asus.xml
<OpenNI>
<Licenses>
<License vendor="PrimeSense" key="0KOIk2JeIBYClPWVnMoRKn5cdY4="/>
</Licenses>
<Log writeToConsole="true" writeToFile="true">
^C[verbose] ofAppRunner: sighandler caught: 2
[verbose] ofEvents: OF app is being terminated!
[notice ] ofAppEGLWindow: destroyNativeKeyboard()
[notice ] ofAppEGLWindow: destroyNativeKeyboard(): unable to reset terminal
[notice ] ofAppEGLWindow: destroySurface(): destroying EGL surface
[verbose] ~ofxOMXPlayer: isOpen: 1
[verbose] close: isOpen: 1
[verbose] ~ofxOMXPlayerEngine START
[verbose] OMXPlayerVideoBase::Close()
[verbose] OMXPlayerVideoBase::Flush start
@jvcleave
jvcleave / distccd-rpi.plist
Last active November 30, 2025 15:45
mac distcc install instructions
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>distccd-rpi</string>
<key>Program</key>
<string>/Users/YOUR_USER_NAME/Scripts/launchd-distccd.sh</string>
<key>RunAtLoad</key>
<true/>
@jvcleave
jvcleave / OMX_PARAM_CAMERADISABLEALGORITHMTYPE
Created October 28, 2013 19:10
OMX_PARAM_CAMERADISABLEALGORITHMTYPE
OMX_PARAM_CAMERADISABLEALGORITHMTYPE controlType;
OMX_INIT_STRUCTURE(controlType);
controlType.eAlgorithm = OMX_CameraDisableAlgorithmImageEffects;
OMX_ERRORTYPE error = OMX_GetConfig(camera, OMX_IndexParamCameraDisableAlgorithm, &controlType);
if(error != OMX_ErrorNone)
{
ofLog(OF_LOG_ERROR, "camera OMX_GetConfig OMX_IndexParamCameraDisableAlgorithm FAIL error: 0x%08x", error);
#include "ofMain.h"
#define STRINGIFY(x) #x
class ofApp : public ofBaseApp
{
public:
ofParameter<bool> createBoolean(ofXml& xmlParser)
{
@jvcleave
jvcleave / eglinfo
Last active December 7, 2023 15:16
Raspberry Pi GL extensions
source
http://pastebin.com/raw.php?i=Vnje5sEe
gcc -o eglinfo eglinfo.c -lEGL -lGLESv2 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -L/opt/vc/lib
EGL
Vendor: Broadcom
Version: 1.4
Client APIs: OpenGL_ES OpenVG
This file has been truncated, but you can view the full file.
!! Found NAL at offset 51203 (0xC803), size 14 (0x000E)
XX 00 00 00 01 27 64 00 20 AC 2B 40 28 02 DD 00 F1
==================== NAL ====================
forbidden_zero_bit : 0
nal_ref_idc : 1
nal_unit_type : 7 ( Sequence parameter set )
======= SPS =======
profile_idc : 100
constraint_set0_flag : 0
@jvcleave
jvcleave / PipeReader.h
Last active August 29, 2015 13:56
PipeReader
#pragma once
#include "ofMain.h"
extern "C"
{
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>