Few questions...

  1. When I generate(load from file) textures does it use graphics card memory or just normal memory??? Or can I decide it somehow???

  2. Which one is faster draw two triangles or one quad (I have noticed that if I draw particles with quads they are little faster than with two triangles, am I right?)

  3. Is any easy way to play music and sound effects in game, without directx

  4. Is there any short and easy way to load jpeg images or some other good well compressed image format (don’t want to use OpenIL or anything like that) JUST PURE CODE

  1. file -> RAM -> card memory always

  2. should be traingales, because OpenGL spilts a quad into two triangles anyway

  3. no idea

  4. hmm there are libaries out there to help…

Chris

  1. Quads will be slightly faster if your draw your triangles as GL_TRIANGLES, cos it’s 4 vertices against 6. Compare it to a TRIANGLE_STRIP. Which would also be 4 vertices. Probably the best.

  2. OpenML (not out yet), OpenAL.

  3. No. For the simple fact that the algorithms behind Jpegs, are not easy. They are horrendously complicated! Use a library, or do without. Pointless spending time learning how to decrypt it, and by the time you do, Jpeg 2000 will be out, which is far superior. Use Intel’s Jpeg library.

Nutty

  1. OpenGL keeps a backup copy of your texture in RAM, in addition to a possibly uploaded copy in video RAM. Thus, while you’re uploading the texture, there are three (3) copies of the texture data.

  2. Two triangles == 6 vertices. One quad == 4 vertices. If vertex transfer is a bottleneck, quads should win out.

  3. Too many to mention. Try looking for BASS or some other “mod/tracker” package. Or just use wavOutOpen(). Or just use DirectSound; it’s really quite easy.

  4. IJL (the Independent JPEG Group Library) de-compresses JPEG, and comes in code. Or you can require modern windows, and store your images as BMPs with JPEG compression and let the Windows BMP loader deal with it.

  1. One triangle strip (two tris) - 4 vertices, (four tris) - 6 veritices …etc. etc. - I guess triangle strips are the best ones!

Originally posted by miikkal:

4. Is there any short and easy way to load jpeg images or some other good well compressed image format (don’t want to use OpenIL or anything like that) JUST PURE CODE

Try this URL: www.robals.f2s.com/easyjpeg/ it help me out…