Ponies & Light



A garbage-collected container and (pre)loader of ofTextures


Here’s the source code: http://github.com/tgfrerer/ofxTextureServer

This includes an example project.


ofxTextureServer helps you to keep track of ofTextures. It will keep your footprint low if you plan to work with lots of ofTextures.

ofxTextureServer uses a map internally and keeps track of the use count of its textures.

Useful to keep track of all your ofTextures, to preload whole directories of images into ofTextures and access them instantly once your app is running, or to help you automate texture memory management.

I use ofxTextureServer in a couple of projects that require a scene graph. The Pirate Cannon and Project Runway were such projects.

For example, most pirate ships in The Pirate Cannon use the same spritesheet to animate the sails. Each pirate ship object holds a reference to the scene graph’s global ofxTextureServer. Therefore all ships can share the same texture and it is loaded only once.


See included example project.

Reference Render



♥ openframeworks >= 007


ofxTextureServer is released under the MIT License.


Unit 3, 410 Hackney Road,
E2 7AP London, UK