Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Paul Houx paulhoux

🏠
Working from home
View GitHub Profile
@paulhoux
paulhoux / CirclesApp.cpp
Created Feb 28, 2020
Instanced Circles using `geom::Ring`
View CirclesApp.cpp
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
using namespace ci;
using namespace ci::app;
using namespace std;
class CirclesApp : public App {
public:
@paulhoux
paulhoux / ProgressBarApp.cpp
Last active Feb 26, 2019
Example of a background loading thread with a progress bar. Meant to be used with Cinder: https://libcinder.org
View ProgressBarApp.cpp
#include "cinder/Utilities.h"
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
using namespace ci;
using namespace app;
using namespace std;
class ProgressBarApp : public App {
@paulhoux
paulhoux / FastTexture.cpp
Created Feb 14, 2019
Fast texture loading using S3TC+LZ4 compressed textures.
View FastTexture.cpp
/*
Copyright (c) 2019, Paul Houx - All rights reserved.
This code is intended for use with the Cinder C++ library: http://libcinder.org
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
@paulhoux
paulhoux / CanvasUi.h
Created Feb 11, 2017
CanvasUi: a simple 2D modifier tool to drag and zoom your work area. Made for Cinder.
View CanvasUi.h
/*
Copyright (c) 2016, Paul Houx - All rights reserved.
This code is intended for use with the Cinder C++ library: http://libcinder.org
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
@paulhoux
paulhoux / YourApp.cpp
Last active May 14, 2016
Semi-Circle Example (with shader).
View YourApp.cpp
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
using namespace ci;
using namespace ci::app;
using namespace std;
class YourApp : public App {
public:
@paulhoux
paulhoux / QuadCircle.cpp
Last active Jan 23, 2016
Circle of Quads
View QuadCircle.cpp
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/Camera.h"
#include "cinder/CameraUi.h"
#include "cinder/ip/Checkerboard.h"
using namespace ci;
using namespace ci::app;
@paulhoux
paulhoux / colorwheel.cpp
Created Oct 30, 2015
Fix for NanoGui's ColorWheel::adjustPosition() method.
View colorwheel.cpp
ColorWheel::Region ColorWheel::adjustPosition(const ivec2 &p, Region consideredRegions)
{
float x = p.x - mPos.x, y = p.y - mPos.y, w = mSize.x, h = mSize.y;
float cx = w*0.5f;
float cy = h*0.5f;
float r1 = (w < h ? w : h) * 0.5f - 5.0f;
float r0 = r1 * .75f;
x -= cx;
View VivekSampleApp.cpp
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/Rand.h"
using namespace ci;
using namespace ci::app;
using namespace std;
class VivekSampleApp : public App {
@paulhoux
paulhoux / CubeMapApp.cpp
Last active Aug 29, 2015
Shows how to render a dynamic scene as 6 faces of a cube map (horizontal cross)
View CubeMapApp.cpp
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/Camera.h"
#include "cinder/Rand.h"
using namespace ci;
using namespace ci::app;
using namespace std;
@paulhoux
paulhoux / GradientApp.cpp
Created Jun 5, 2015
Example of how to create a texture from code. Here, we create a gradient texture.
View GradientApp.cpp
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
using namespace ci;
using namespace ci::app;
using namespace std;
typedef std::pair<float, ColorA> ColorStop;
You can’t perform that action at this time.