Jump to content


Texture Loading


3 replies to this topic

#1 moomin

    Member

  • Members
  • PipPip
  • 44 posts

Posted 01 July 2003 - 08:10 AM

In teh vastness that is the internet there are several libraries out there for loading textures (i.e. DevIL), although custom loaders can be made. For instance BMP loading is fairly trivial (and SDL has this facility built in, along with a SDL texture library). The question is, is PNG the optimum format for textures, considering its lossless compression coupled with a alpha channel, secondly how hard is it to load PNG files as textures.

#2 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 01 July 2003 - 11:26 AM

png has a lot of internal formats, lossy and lossless ones..

the "perfect" format is dds, direct draw surface. why? because it is optinonally lossless or lossy, with mipmaps or not, and can get directly load into system, as it uses the same compression algo as gpu's have to decode.

i for myself just use bmp or so.. dunno..


the "best" thing i've seen is from maven.de (hope link is right), wavelet compression much like in jpg2000...

but for textures? dunno.. i haven't mastered his sourcecode yet to load my own files:(
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#3 moomin

    Member

  • Members
  • PipPip
  • 44 posts

Posted 01 July 2003 - 12:39 PM

Hmmmmm, I suppose this isn't really an opengl issue, and is really a personal decision. BMP's are fine(ish) just their lack of alpha (although you can "fix" this, and the comperatively large filesize). For testing/learning BMPs are fine

#4 keless

    New Member

  • Members
  • Pip
  • 2 posts

Posted 05 July 2003 - 06:13 AM

First of all, you should concider what resource types some of your models will require. If you're supporting .3ds or Md3 you're almost bound to .BMP or .TGA
I liken myself to an amazing man-child of DOOM!!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users