If I were using C++, I would start with a simple base class:
Code:
class Sprite
{
public:
bool Visible;
virtual void Draw();
};
Everything my application could possibly draw would inherit and implement this base class. Each object would have its own overriding Draw() method to draw itself. I would then have a list of objects to draw:
Code:
std::map<int, Sprite> allSprites;
Then in the drawing loop you described, I would go:
Code:
for (int i = 0; i < allSprites.length; i++)
{
if (allSprites[i].Visible == true)
{
allSprites[i].Draw();
}
// no draw
}
Its a nice simple object oriented way of drawing. Polymophism is great because it lets each child class write its own draw method. But your main openGL loop doesn't need to know things for each object - all it needs to know is that its a Sprite (it has a Visible attribute and a Draw() method).
Hope that helps