View Full Version : How should I design my 'Object' class for an OGL program?

10-01-2000, 08:17 AM
I was starting a little project (read a very simple project) and wanted to have an object class to represent all the objects in my OGL world (some boxes, balls, and stuff).
My question is about the members the class should have in order to draw them. My first idea was to have an array of all the vertices, and some members like position coordinates and so on. Is this sufficient? What else should I add?

10-01-2000, 03:18 PM
I'm assuming you're coing something along the lines of a base class 'Object' that you derive more specific objects from (kind of like an abstract class, if you will). But that is the gerneral idea, it really depends on how self-sufficient you want the classes to be; you could also have flag bits representing things like transparent, bitmapped, etc. If you want anything more specific, a more detailed description of this little project would be neccesary