Skip to content

Instantly share code, notes, and snippets.

@sansumbrella
sansumbrella / ProjectSetup.md
Last active April 3, 2021 22:20
Brief instructions for project setup using submodules.

Instructions for project setup using submodules.

Initialization

# Add Cinder and Soso submodules, specifying the branches we want
git submodule add -b release --name Cinder git@github.com:sosolimited/Cinder.git lib/Cinder
git submodule add -b cinder --name Soso git@github.com:sosolimited/ofxSoso.git lib/ofxSoso
@sansumbrella
sansumbrella / CameraTestApp.cpp
Created September 3, 2014 20:14
Roll/Pitch/Yaw weird
#include "cinder/app/AppNative.h"
#include "cinder/gl/gl.h"
#include "cinder/Camera.h"
#include "cinder/params/Params.h"
using namespace ci;
using namespace ci::app;
using namespace std;
@sansumbrella
sansumbrella / IntelJFC.md
Last active August 29, 2015 14:07
Letter to Intel

The reason I'm writing today is the decision, relayed by your customer support team, to pull advertising for Intel RealSense Technology from the online publication for game industry professionals, Gamasutra.com.

I am very disappointed in your response to important cultural criticism that is driving our field forward. It is especially dismaying that you would pull support from the site on the basis of a single article and the complaints of a small, bigoted group.

The writing of critics such as Leigh Alexander, Mattie Brice, Robert Yang, and Anita Sarkeesian is essential to the growth of the gaming and computing industry and vital to our wider cultural discourse. It is shameful that a major corporation would run away from this discourse, especially if it purports to be interested in developing the technologies of the future.

The technologies of the future are inherently bound up in the culture of the future. They do not exist apart from racism, sexism, and classism. By pretending that technology can be separ

@sansumbrella
sansumbrella / gist:fae0ca475a5c965e6e06
Created January 26, 2015 18:22
Sublime Text 2 Keybindings Preferences
[
// match XCode switch file key binding
{ "keys": ["super+ctrl+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} }
, { "keys": ["super+ctrl+down"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} }
// move line like XCode
, { "keys": ["super+option+["], "command": "swap_line_up" }
, { "keys": ["super+option+]"], "command": "swap_line_down" }
]
qtime::MovieGlRef loadMovie( const ci::gl::ContextRef &context, const ci::fs::path &path ) {
ci::ThreadSetup thread_setup;
try {
context->makeCurrent();
auto movie = qtime::MovieGl::create(path);
return movie;
}
catch( std::exception &exc ) {
CI_LOG_E( "Error loading texture: " << exc.what() );
return nullptr;
@sansumbrella
sansumbrella / image_load_timing.cpp
Last active August 29, 2015 14:18
Test of async and synchronous image load timing in Cinder.
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/gl/Texture.h"
using namespace ci;
using namespace ci::app;
using namespace std;
struct TextureInfo {
@sansumbrella
sansumbrella / UnixSignalHandlers.h
Last active December 7, 2015 22:33
SIGPIPE and SIGTERM handlers
/*
* Copyright (c) 2015 David Wicks, sansumbrella.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@sansumbrella
sansumbrella / build_for_tvos.sh
Last active March 16, 2021 14:50
Build OpenCV3 for tvos
#!/bin/bash
# Place this file adjacent to opencv and you should be able to build for tvos.
# The OpenCV CMakeLists.txt file is pretty huge, but it is well organized,
# so if you need to make changes, consult what options there are in that file.
# A whole bunch of compiler tests fail, but that doesn't seem to matter.
#
# After this runs CMake, you will want to build the binaries and install the headers.
# $ make -j 8
# $ make install
#
@sansumbrella
sansumbrella / user-config.jam
Last active June 2, 2016 19:55
Expansion of Cinder's user-config for building libraries for tvos.
using clang : osx
: xcrun clang -arch i386 -arch x86_64 -stdlib=libc++ -std=c++11 -mmacosx-version-min=10.8 -fvisibility-inlines-hidden
;
using clang : ios
: xcrun clang -arch armv7 -arch arm64 -stdlib=libc++ -std=c++11 -miphoneos-version-min=6.0 -fvisibility-inlines-hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/
;
using clang : ios_sim
: xcrun clang -arch i386 -arch x86_64 -stdlib=libc++ -std=c++11 -miphoneos-version-min=6.0 -fvisibility-inlines-hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/
@sansumbrella
sansumbrella / TinyScene.cpp
Last active July 14, 2016 22:57
Tiny Cinder C++ Scene Graph
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/Utilities.h"
#include "cinder/Log.h"
#include "cinder/Json.h"
using namespace ci;
using namespace ci::app;
using namespace std;