Sign in to follow this  

Feeling Lib-Dependant

This topic is 4303 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well recently I started taking a C++ class at school. The actual class is a huge bore because I've been programming for ~2 years and the last thing we learn (at the end of the year) is arrays (we don't get to classes, inheritence, polymorphisum, templating). The computers that we work on in this class don't have the internet and they only have the standard libs on them. When trying to program a simple game in opengl (a lib they already had fortunatly) I found myself without a clue as to how to load an image file because usually I just use SDL_Image. Maybe I'm asking too much out of only 2 years but I was just wondering if wanting/needing to use libs is normal and how lib independant I should become if I want to go into a career programming (not sure exactly WHAT). Libs are something that are always going to be around but I'm not sure how much I want to rely on that.

Share this post


Link to post
Share on other sites
You should be familiar with the basic idea of image compression, and maybe have a cursory knowledge of what goes on under the hood... but by all means, use libraries. There is no point in reinventing the wheel most of the time. But if you have a basic knowledge of how images are stored, you will be able to quickly learn how to load specific formats on your own if the need ever arises.

Share this post


Link to post
Share on other sites
Luckily, image formats are usually very simple [even with compression], and not nearly as complicated as some of the 3D mesh file types. If you want to go with bitmaps, it is even easier! A good place to start would be to just google for the file type, and in the case of the bmp file type, you'd get something like

http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html

The other types, like jpeg and whatnot, are pretty simple, but just different. Personally think it is a good idea to make a loader or two, just to understand what you are taking advantage of when you use library calls, and the bmp is a great learning device since it uses [usually] absolutely no compression

Share this post


Link to post
Share on other sites
Quote:
Original post by raptorstrike
Maybe I'm asking too much out of only 2 years but I was just wondering if wanting/needing to use libs is normal and how lib independant I should become if I want to go into a career programming (not sure exactly WHAT). Libs are something that are always going to be around but I'm not sure how much I want to rely on that.


My personal opinion? The first couple of times you do something, you should re-invent the wheel all the time. Except when doing something like writing a regular expression library. You know, the things that would take months by themselves.

But writing a loader for a partiular image format? Yeah, write that from scratch a couple of times and then use the libraries. That way you'll definately know how to do it if you actually ever have to write one from scratch.

Share this post


Link to post
Share on other sites
"The only thing that interferes with my learning is my education." ~ Albert Einstein

I'm not entirely sure what you're asking here, but I'll take a guess and post a link to DevIL. It's an image loading library which loads a ridiculous amount of image formats. It also links up to OpenGL very well as it provides some explicit OpenGL functionality.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rob Loach
"The only thing that interferes with my learning is my education." ~ Albert Einstein

I'm not entirely sure what you're asking here, but I'll take a guess and post a link to DevIL. It's an image loading library which loads a ridiculous amount of image formats. It also links up to OpenGL very well as it provides some explicit OpenGL functionality.


Except he has no internet access in class :)

I would suggest tga, it's probably the easiest format to load apart from bitmaps.

Share this post


Link to post
Share on other sites

This topic is 4303 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this