Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Loading bitmaps in OGL
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
AsianSensation




PostPosted: Sun Apr 25, 2004 4:14 pm   Post subject: Loading bitmaps in OGL

I was reading through the Nehe OpenGL tutorials, and I saw that when you load a bitmap, you need to have the height and width being exactly some powers of 2. Is there a simple way around it?
Sponsor
Sponsor
Sponsor
sponsor
Catalyst




PostPosted: Sun Apr 25, 2004 4:46 pm   Post subject: (No subject)

Simply, no
You could resize the image after loading to memory but before loading to ogl or you could use some 3rd party library that will do this for you. (i recommend DevIL)
Raugrist




PostPosted: Sun Apr 25, 2004 5:36 pm   Post subject: (No subject)

Asian, try this. Unless you really had your heart set on writing your own image loader (from the NeHe tutorials), this can prove useful. It'll load pretty much any image format you could want (or at least, any I could want: ie, TGA, JPG... well, that's all I need). And it's got some good options for optimization or efficiency.
Catalyst




PostPosted: Sun Apr 25, 2004 6:17 pm   Post subject: (No subject)

I would recommend DevIL over that
http://openil.sourceforge.net/

its loads almost any image format (really simply with ogl)
and saves out in many formats
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: