Feeling Lib-Dependant

Started by
8 comments, last by nuvem 18 years, 1 month ago
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.
____________________________"This just in, 9 out of 10 americans agree that 1 out of 10 americans will disagree with the other 9"- Colin Mochrie
Advertisement
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.
It sounds like this is a great opportunity to learn OpenGL. It's also an opportunity to re-invent the wheel (which is useful when you want to learn how low-level stuff works).
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
yeah I am learning OpenGL outside of class anyway so I could use this time to get more familiar with it. I will look into how image formats are stored and maybe get a running image loader up.
____________________________"This just in, 9 out of 10 americans agree that 1 out of 10 americans will disagree with the other 9"- Colin Mochrie
Or you could just use regular uncompressed BMPs...
-----------------------------------Indium Studios, Inc.
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
I agree... Here's a good site for file formats.
Quit screwin' around! - Brock Samson
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.
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
"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.
Rob Loach [Website] [Projects] [Contact]
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.

This topic is closed to new replies.

Advertisement