game questions

I am creating a game and I using classes for other things in my game, I was wondering if i should use classes for rendering objects?

Just going to say that your question is really broad. You haven't given hardly any information.

Anyways, in some cases yes, you should use a class to manage rendering.

A good example you could check out for a game using a class to manage rendering is The Powder Toy. Check out its source code, the guy has a big 'ole class just for rendering.

You don't always need to though, it really depends. I mostly use SFML for my graphics in game programming, which highly abstracts the rendering. (It's not even called rendering, you just make draw() calls) so I usually don't need anything related to managing rendering. When I look at games made with SDL or OpenGL however, I often see a Renderer class.

Need more information.
Last edited on
Topic archived. No new replies allowed.