Skip to content

Instantly share code, notes, and snippets.

@arielm
arielm / Trimesh16.cpp
Created June 2, 2011 12:41
A quick and dirty version of Cinder's Trimesh, to be used on iOS
/*
Copyright (c) 2010, The Barbarian Group
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.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
@arielm
arielm / manip1App.cpp
Created June 11, 2011 17:38
Adaptation of "3D manipulation techniques for multitouch displays" to the iPad
#include "cinder/app/AppCocoaTouch.h"
#include "cinder/app/Renderer.h"
#include "cinder/Camera.h"
#include "cinder/CinderResources.h"
#include "cinder/ImageIo.h"
#include "cinder/gl/Texture.h"
#include <vector>
#include <map>
#include <list>
@arielm
arielm / Application.cpp
Last active December 15, 2015 23:09
Test case for Cinder's gl::TextureFont
#include "cinder/app/AppNative.h"
#include "cinder/gl/TextureFont.h"
using namespace ci;
using namespace ci::app;
using namespace std;
const string text = "This is a long sentence that should split over a few good lines, hopefully!";
class Application : public AppNative
@arielm
arielm / gist:5352546
Last active December 16, 2015 01:08
Updated test case for Cinder's gl::TextureFont
/*
* TESTING UNICODE FONT RENDERING WITH gl::TextureFont
*
* FOLLOW-UP QUESTION IN THE CINDER FORUM:
* https://forum.libcinder.org/#Topic/23286000001505051
*
* COMMENTS:
* 1) IDEALLY, WE WOULD LIKE TO BE ABLE TO PRECALCULATE THE SIZE
* OF A TextBox AND TO COMPUTE ITS LAYOUT IN THE SAME PASS
* 2) THE CURRENT SYSTEM FOR DISPLAYING ARBITRARY SCALED TEXT
@arielm
arielm / Makefile
Created October 10, 2013 15:19
Patch to "Makefile" included in Poco 1.4.6p1, and adding support for Zip and Data/SQLite
#
# Makefile
#
# The global Makefile for POCO [generated by mkrelease]
#
sinclude config.make
ifndef POCO_BASE
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
@arielm
arielm / components
Last active December 25, 2015 10:29
Patch to "components" included in Poco 1.4.6p1, and adding support for Zip and Data/SQLite
CppUnit
Foundation
XML
Util
Net
Zip
Data
Data/SQLite
@arielm
arielm / Makefile
Created October 14, 2013 12:19
Patching Poco 1.4.6p1 "basic edition" to add additional packages
#
# Makefile
#
# The global Makefile for POCO [generated by mkrelease]
#
sinclude config.make
ifndef POCO_BASE
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
@arielm
arielm / Android
Last active December 25, 2015 12:19
Patching Poco 1.4.6p1 "basic edition" to support OpenSSL
#
# $Id: //poco/1.4/build/config/Android#3 $
#
# Android
#
# Make settings for Android NDK
#
#
# General Settings
@arielm
arielm / ios-fonts-dump
Last active January 1, 2016 09:09
Fonts on my iPad 1 (5.0.1)
/System/Library/Fonts/CGFontCache.plist
/System/Library/Fonts/CGFontCacheFull_H_.plist
/System/Library/Fonts/CGFontCacheFull_UH_.plist
/System/Library/Fonts/CGFontCacheK48.plist
/System/Library/Fonts/CGFontCacheN72.plist
/System/Library/Fonts/CGFontCacheN82.plist
/System/Library/Fonts/CGFontCacheReduced_H_.plist
/System/Library/Fonts/CGFontCacheReduced_UH_.plist
/System/Library/Fonts/CGFontCache_H_.plist
/System/Library/Fonts/CGFontCache_UH_.plist
@arielm
arielm / std::tie copy test
Last active January 3, 2016 04:39
Checking if object copying is taking place each time std::tie is called. The answer: TestObject is not copied. Good news, say, if we want to use std::tie for maps (with complex keys...)
#include <string>
#include <tuple>
#include <iostream>
struct TestObject
{
std::string s;
int i;
TestObject(const std::string &s, int i)