Original Post
I created a class that loads an object when initiated, like this: The texture's ID (internal number used by OpenGL) is stored, obviously, in private member ID. I could make it public yes, but my point is I want to use the ID directly, like this: texture tex("mytexture.bmp"); glBindTexture(tex); without resorting to methods nor member designation (like tex.returnID or tex.ID). I though about overloading the unsigned int operator, but I don't know if it'll work. Thanks in advance.
class texture
{
public:
texture(filename);
~texture(void);
private:
void loadtga(void);
void loadbmp(void);
GLuint id;
}