Marcus Olsson
11-17-2008, 03:26 PM
Ok, so I've got two derived classes from a Shape base class. The base class contains the vertices, normals and indices that I want to use with glDrawElements(). I want to initialize the fields with the values given in the constructors of the derived classes. What is the best way to do this? The only thing I can come up with is
Cube() : vertices({blablabla}){}
But at this time, the field is already initialized by the default Shape() constructor, right?
This might be a pure C++-related question but I got great answers on my last post so I thought I might as well ask.
Cube() : vertices({blablabla}){}
But at this time, the field is already initialized by the default Shape() constructor, right?
This might be a pure C++-related question but I got great answers on my last post so I thought I might as well ask.