Skip to content

Instantly share code, notes, and snippets.

@joshuajnoble
Created April 27, 2014 23:29
Show Gist options
  • Save joshuajnoble/11358023 to your computer and use it in GitHub Desktop.
Save joshuajnoble/11358023 to your computer and use it in GitHub Desktop.
// declaration stays the same
ofTexture {
private:
ofTextureImpl *textureImpl; // raw ptr or ofPtr?
public:
// all the usual stuff here
};
// stuff ofTextureImpl needs
class ofTextureImpl {
virtual void bind() = 0;
//.....
};
// now some actual implementations for things we need
// more files, of course, but totally separate = pretty clean in there
class ofTex2dGlesImpl {
virtual void bind();
//.....
};
class ofTex2dImpl {
virtual void bind();
//.....
};
// I want these, personally, but they require different data types for loadData() etc,
// couldn't we just template those out?
class ofTex3dImpl {
virtual void bind();
//.....
};
class ofTex2dArrayImpl {
virtual void bind();
//.....
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment