It is currently Sun Feb 25, 2018 8:47 pm

 Page 1 of 1 [ 2 posts ] 
Author Message
 Post subject: Wrapper classes
PostPosted: Sun Jul 03, 2011 5:59 am 

Joined: Fri Sep 04, 2009 3:24 am
Posts: 30
Are they necessary or more specifically, do they help?

I finally broke down and bought an OpenGL and got a book about DX7 for free. They was throwing it away and the guy asked if I wanted, I've yet to find a way to cut free in half, so I took it.

Mostly it's the dx help file, but he had a chapter in which he wrapped all the functions in classes, setting defaults for most of them. It seemed to be a lot of work for nothing.

After reading through the OpenGL book, it seems a wrapper class would help in it's case. But the vmk's hardly use any of the OpenGL functions. I know Marek plans on doing shaders later on, so would it be worth the effort?

 Post subject: Re: Wrapper classes
PostPosted: Sat Sep 17, 2011 6:47 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1106
Location: Ontario Canada
I find it really depends on the API that you are using. If the existing API has been designed to be object oriented and it gives you what you need so that to do one thing doesn't require many repetitive calls, then use it as is. However if you can find a way to simplify the API, then definitely wrap it up into your own class.

The other thing to consider is this, if you are going to be developing code to be cross platform complient a lot of times you'll need different API to do the same thing, so in this case using a wrapper is a must.

Display posts from previous:  Sort by  
 Page 1 of 1 [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to: