Loading Textures

Started by
16 comments, last by THACO 19 years, 10 months ago
Just one question: Why the **** should anyone use libraris for bitmap''s or targa''s when it''s soooo easy to write one yourself.??? It''s really not that hard, I mean take a look at some (official) papers describing the header and body and the rest is almost piece of cake! The only strange things is that bitmaps''s are organized in a row system with a 0x00 at the end of each vertical row and targa''s is organized in BGR (or BGRA) instead of RGB (or RGBA).
Killers don't end up in jailThey end up on a high-score!
Advertisement
quote:Original post by nife
Just one question: Why the **** should anyone use libraris for bitmap''s or targa''s when it''s soooo easy to write one yourself.??? It''s really not that hard, I mean take a look at some (official) papers describing the header and body and the rest is almost piece of cake! The only strange things is that bitmaps''s are organized in a row system with a 0x00 at the end of each vertical row and targa''s is organized in BGR (or BGRA) instead of RGB (or RGBA).





Sharp Basic - Coming summer 2004!
Sign Up For Sharp Basic Beta Testing!!!
errm, because they are there to be used?
Look at it this way, I could go out and code it but I dont want to, I''d much rather use a tried and tested lib and just drop it in my app then bother about it.
If you want to go out and reinvent the wheel all the fine, whatever, but personaly I prefer to do other stuff and use whats avalible to me than write everything again from the ground up, thus why I use all manner of libs such as image loading/saving, networking, STL and Boost.
I personally would like to create everything myself because i will be using this for a school project and probably in my own engine, also it is good to learn how to read in file formats, i have done some work with reading in files before but i still could use some work. The only reason i would stay away from libraries is because this should not be to hard to learn and it will help me in more ways than just texture loading, it will also help me with reading file formats.

-THACO
meh, your choice but i cant help feel its a large waste of time, I mean where does it stop? "I wont use the STL because i want to do it myself", "I wont use a ready made scripting language coz i want to do it myself" and so on and so on.. *shrugs*
Unless they say ''you must recreate the wheel for everything'' then i dont see the issue with school work and the libs I use are all zlib/png licence stuff which is basicaly ''do what you like with it'', so no worries about including it in engines etc... still, *shrugs* do as you want...
I don''t mean any disrespect about it. I want to be able to tell people i did it all, that and with school the whole honor code stuff. Maybe i just have to much pride and am to stubborn, but it is also a great feeling when you do something yourself.

-THACO
It is not so much recreating the wheel. Maybe he wants to learn it himself, u get 20 times more satisfaction if u can say "I made this" not "I did the gfx". Altho if u want to jus create not learn, use libs by all means. Hope u have fun with ur project THACO remember to use these sites as they are really useful:

Nehe
Game Tutorials
ultimate game programming

Go for it!

------------

"Here lies a toppled God,
His fall was not a small one,
We but built his pedastle,
A narrow, and a tall one"
Frank Herbert (Dune:Messiah)

[edited by - Kris2456 on June 9, 2004 10:29:37 AM]

[edited by - Kris2456 on June 9, 2004 10:30:33 AM]
------------ "Here lies a toppled God,His fall was not a small one,We but built his pedastle,A narrow, and a tall one" Frank Herbert (Dune:Messiah)
quote:Original post by Xarragon
Well, in the end, OpenGL always want pure RGB/RGBA data, so whatever format you use, you must decompress it into this. This might hoever be different if you use texture compression, but I couldn''t tell for sure.

You can use the DXT texture compression (ie .DDS files) to store and use the textures. this is handy if you''ve got a load of large textures (my terrain engine uses 64 x 1024x1024 32 bit textures so it needs compression. other nice thing about this is that the DDS plugin for photoshop generates the mip maps for you as well so you get compression for all mipmap levels.

i is 1337

This topic is closed to new replies.

Advertisement