Jump to content
  • Advertisement
Sign in to follow this  
Decrius

OpenGL JPEG and 3DS: dll? library? header?

This topic is 4581 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

Hiyall, I did some tuts about importing textures and models into OpenGL. So far, I can import .bmp and .tga files as textures. All from http://www.morrowland.com/apron/tut_gl.php That site has a tutorial about JPEG too, so I thought, lets try it, because JPEG files are often used. But, after importing the stuff in my project, I had to include the jpeglib.h, which was included in the tutorial. All old errors were gone, but new ones appeared. Such as 'boolean' insteed of 'bool' (changed it), and this warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. There were also a lot of things, like this: .objs\main.o:main.cpp:(.text+0x6d6): undefined reference to `jpeg_std_error' I thought about I'd need a dll file. But I have not even a single dll file with the word 'jpeg' or 'jpg' in its name. I also didn't had any library file for jpeg or jpg. Can anyone give me a link to download all the JPEG files? Header file, LIBrary file and DLL file. Thank you :D I already made another post about this, but I thought I'd be better to make a new thread, insteed making the old thread with another subject long. Next point: 3DS files. I followed different tutorials to include 3DS files. But noone worked so far (ofcource, else I wouldn't post this, ehehe :p). Do I need specific Header files, LIBrary files or DLL files to import 3DS files too? And has anyone a tutorial like these texture tutorials: http://www.morrowland.com/apron/tut_gl.php But than with .dds files, and .pcx files and all other image files.Or knows anyone a site to download a program which accepts all image files + source? Thank, your help is very appreciated :D Decrius

Share this post


Link to post
Share on other sites
Advertisement
while its possible to parse 3Ds files on your own its much easier using a library.
never used it but its often recommendet
http://lib3ds.sourceforge.net


for image loading i can *really* recommend freeimage!
http://freeimage.sourceforge.net
its easy to use and pretty powerfull (and loads a huge amount of different formats)

Share this post


Link to post
Share on other sites
Thank you guys a lot :D

And how can I implent the FreeImage project into OpenGL? Because it will need an ID: glBindTexture(GL_TEXTURE_2D, id_texture[1]);

[Edited by - Decrius on April 1, 2006 6:56:29 AM]

Share this post


Link to post
Share on other sites
you can have a look at my texturemanager here
http://svn.sourceforge.net/viewcvs.cgi/adeptus/engine/rendersystem/ctexturemanager.cpp?view=markup&rev=12

while it does alot of extra stuff (like using smart-pointers, only loading every image you throw at it once, rescaling if image size is not supported by graphics card and so on...) you should only need to look at the function "CTextureManager::LoadTexture" which also calls "CTextureManager::CreateTextureFromBuffer".

shouldn't be too hard to figure it out!

you may also use my source directly. but i have to warn you that its covered under the GPL so you would have to distribute your source too ;-)

[Edited by - Charon on April 1, 2006 11:12:29 AM]

Share this post


Link to post
Share on other sites
Thanks for the manager :)

I'll try it tomorrow, bed time now haha :p, I'll try to figure it out ;)

Decrius

Share this post


Link to post
Share on other sites
As for the 3ds, I'm currently writing (almost finished) a simple library to load them. If you want to write your own loader, I could send you my code, if you're interested...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!