Skip to main content
GameDev.net gamedev.net
🔒 Locked

API abstraction

Started by DarkHamster Dec 21, 2002 at 9:32 PM 0 replies 200+ views
Original Post
DarkHamster
DarkHamster
Im a little confused as to how I can properly abstract my engine from an API (in this case openGL). I was thinking of creating a Renderer class, so when I wanted to draw a triangle I would just say Renderer->Triangle3f(blah);, but this seems like it would entail a whole lot of overhead. Am I on the right track with this thought, or is there a better way?

"There is no dark side of the moon really,
As a matter of fact, its all dark."


"There is no dark side of the moon really,
As a matter of fact, its all dark."
billybob
billybob
thats what i''m doing, but also wrap whole meshes/terrains for better performance. so if you can''t use the high level wraps with little overhead use the low level oens but with more overhead. also inline as much as possible.

Topic Locked

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

Sign in to reply to this topic.