Sign in to follow this  

how to load JPEG

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

hello everybody,i am a newbie,i just know use auxDIBImageLoad to load BIT as texture.but now i want to use JPEG,can you tell me how to deal with it ,which functions i can use. thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by CNBABY
thank you.i use opengl.how about you?if compare with DX,which one is better for network game.
DirectX all the way. OpenGL is a graphics library, it only does graphics.

Share this post


Link to post
Share on other sites
Quote:
Original post by Binomine
Quote:
Original post by CNBABY
thank you.i use opengl.how about you?if compare with DX,which one is better for network game.
DirectX all the way. OpenGL is a graphics library, it only does graphics.


OpenGL is a lot easier to use and learn the DirectX - I don't think anyone can argue me about that.

Now DirectX sure does have a lot more features than OpenGL: graphics, input, audio, networking as well as great documentation that make it a godo choice for having all the components in one package to devlop a game.

OpenGL *is* just a graphics api, BUT you have to look at all the avaliable stuff you can use with it. If you need fast and easy input you can use SDL, which will also take care of the opengl video. For audio there is FMOD and SDL_Mizer - both easy to use. For support of multiple images, there is SDL_Image. For networking, there is SDL_Net. There are also many other libraries to interface with OpenGL to give it all the features that DX has.

If you have the time and patience to learn DX, definitly go for it, but if you are just starting, or want something a little bit easier, that is just as comparable in performance and expectations, I'd go for using OpenGL/SDL libraries.

As for which one is better for network play, I'd say go for anything but DX. I've read in several game programming books as well as network game programming books (I have tons) that DirectPlay is the last thing you want to use. As of now with the new DX 9 *this may not be accurate anymore*. Ive heard some good things about Dx9, but I have no experience in it *yet*.

If you are serious about networks, take a look at this book: "Developer's Guide to Multiplayer Games" (ISBN 1-55622-868-6) I have not read much of it, but from what I have skimmed, it has about everything you will need to learn about multiplayer games. There are other books as well, but this is the main one I remember for this topic. I hope this helps and good luck!

Share this post


Link to post
Share on other sites
Wow.. turning into a flame war. Stop now :D.

You have a few options. You can use a premade library for whatever API you decide to use. You can use libjpeg. Or, you could read the file specification and do it yourself.

Your choice :)


Oh yeah, preemptive IBTL.

Share this post


Link to post
Share on other sites
Quote:
Original post by Binomine
Quote:
Original post by CNBABY
thank you.i use opengl.how about you?if compare with DX,which one is better for network game.
DirectX all the way. OpenGL is a graphics library, it only does graphics.


yes, but so what? if you wanted to, you could still use Direct X components for everything else, and use OpenGL for rendering. i just don't understand why it matters that OpenGL "only does graphics". D3D also only does graphics... they are graphics libraries [smile].

Share this post


Link to post
Share on other sites
Quote:
Original post by graveyard filla
Quote:
Original post by Binomine
Quote:
Original post by CNBABY
thank you.i use opengl.how about you?if compare with DX,which one is better for network game.
DirectX all the way. OpenGL is a graphics library, it only does graphics.


yes, but so what? if you wanted to, you could still use Direct X components for everything else, and use OpenGL for rendering. i just don't understand why it matters that OpenGL "only does graphics". D3D also only does graphics... they are graphics libraries [smile].


DirectX is a full game library so all of it's component would work perfectly together. It just seems more like a mess to user various different libraries together since most of the time the coding conventions of those different libraries are completely different. Using OpenGL with Corona, Audiere or FMOD, SDL_ttf with HawkNL(whatever its called) would be much more of a mess then using Direct3D[with DirectSound, DirectPlay, etc.]. The best setup for an OGL coder would be : OpenGL, OpenAL, DevIL, and WinAPI. Setting up OpenAL is a little difficult though....

Share this post


Link to post
Share on other sites
Quote:
Original post by graveyard filla
Quote:
Original post by Binomine
Quote:
Original post by CNBABY
thank you.i use opengl.how about you?if compare with DX,which one is better for network game.
DirectX all the way. OpenGL is a graphics library, it only does graphics.


yes, but so what? if you wanted to, you could still use Direct X components for everything else, and use OpenGL for rendering. i just don't understand why it matters that OpenGL "only does graphics". D3D also only does graphics... they are graphics libraries [smile].
I'm not endorcing DirectX, it's simply answering the question in once sentence: OpenGL does not have networking so it's unsuited for a network game. XD

Khaosifix, the whole arguement that since DirectX is a unified structure that it's better to use all D3D is silly as well. DirectX components are dis-simular enough that learnning a brand new library not too dissimular to learning a new component. And of course, many libraries work well with DirectX, like D3D with Bass Audio and HawkNL.

Share this post


Link to post
Share on other sites

This topic is 4748 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this