Skip to content

Instantly share code, notes, and snippets.

@kitschpatrol
Created January 30, 2011 23:57
Show Gist options
  • Save kitschpatrol/803444 to your computer and use it in GitHub Desktop.
Save kitschpatrol/803444 to your computer and use it in GitHub Desktop.
you might need this to get the texture 2D object glut wants
#include "ofTexture2D.h"
#include "ofUtils.h" // for nextPow2()
#include "ofAppRunner.h" // for getWidth()
ofTexture2D::ofTexture2D(){
textureName[0] = 0;
bFlipTexture = false;
textureTarget = GL_TEXTURE_2D;
}
#ifndef _OF_TEXTURE2D // if this class hasn't been defined, the program can define it
#define _OF_TEXTURE2D // by using this if statement you prevent the class to be called more
// than once which would confuse the compiler
#include "ofTexture.h"
class ofTexture2D : public ofTexture {
public:
ofTexture2D();
};
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment