Skip to main content
gamedev.net
🔒 Locked

OOP GL

Started by Mayrel Dec 3, 2001 at 5:10 AM 1 replies 200+ views
Original Post
Mayrel
Mayrel
I''m making an OOP interface to OpenGL, and I''ve got a couple of questions about how you think it should be done (assuming you think it should be done, at all.) ATM, I''ve got Texture, Light and Display classes. Texture and Light are their GL equivalent, and Display does the initialisation, message loop and other glutty stuff. Basically, I''m wondering: should I make a RenderContext class that replaces the gl* functions (like glViewport() --> rc->setViewport(), glBegin() --> rc->beginQuads/Triangles/TriangleStrip/Points/etc), or just use the old gl functions?
Just Plain Wrong
haust
haust
AP #1 is definitely right : it is your game(s) needs that will help you to design the classes. "All" you need is to have a good understanding about OpenGL behaviour so that the classes will be efficient instead "slowing down your software or complicating the syntax", just has said AP #1....
Think game modules classes instead of basic api wrapper classes.

Edited by - haust on December 3, 2001 2:46:21 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.