C++: Reference and Pointer question (example regarding OpenGL)
- by Jay
I would like to load textures, and then have them be used by multiple objects. Would this work?
class Sprite
{
GLuint* mTextures; // do I need this to also be a reference?
Sprite( GLuint* textures ) // do I need this to also be a reference?
{
mTextures = textures;
}
void Draw( textureNumber )
{
…