class g_cPolygon: public g_cDrawable, public g_cUser<g_cVertexArray>
{
protected:
g_cArray<g_cIndex> m_iIndexes;
public:
g_cPolygon();
g_cPolygon(...);
virtual ~g_cPolygon();
virtual void m_vfDraw();
};
Today I was going to make a polygon class that supported vertex arrays wanted to place a static vertex array in the polygon class. Although, I also wanted to make the program as extencible as I could and therefor wanted all classes that used vertex arrays to be able to share the same one and having the vertex array in the class at the same time. First of all I though about using the "static" keyword, although after a few seconds of consideration I discovered that it wouldn't work. Then I thought that I could make sort of a user class from which the polygon class could inherit, in which I would have something static.
I just wonder if any of you have had any experence with this, if there are better solutions and offcourse: why aren't there a feature like this within the language?