Advertisement

transparent w/o alpha or masks

Started by December 10, 2002 11:20 AM
1 comment, last by murdoth99 22 years, 2 months ago
Hi, I was wondering if there is a way to have transparnt parts in bmp''s without alpha blending the whole image and without using masks. I know one of the tutorials use targa''s (.tga''s) to accomplish this, but I would like to know if its possible to do it with bmp''s as well. If this isn''t possible, could someone explain to me the difference between all of the different image types? Which one''s can do what I am looking for? And what exactly do you need to do to load up and the images and display them with the transparent regions missing? Another unrelated question: Why do the tutorials use GLAux? I was reading the OpenGl website and it said that GLAux is old and GLUT should be used instead now. just wondering Thanks
quote:

Why do the tutorials use GLAux? I was reading the OpenGl website and it said that GLAux is old and GLUT should be used instead now. just wondering



Okay, you''r a bit off there I''m afraid The thing is, you can''t compare the two - one is a utility wrapper (glaux) while the other is also a utility wrapper, but in a whole different sense. The purpose of glaux is to automate some of the menial tasks for you (such as loading bitmaps), the true beauty of glut lies in its ability to provide support for an easy implementation of the same thing on multiple platforms.

As for image types: i''d advise to use bitmaps - they''re easy to create and edit, and generally require no refining (such as saving into/from a different format). Don''t use glaux to load your bitmaps - DIY. It''s not very hard. Regarding other image formats and why they''re often used; the reason is that they are considerably smaller than bitmaps. While only up to 8 bit bitmaps support standardized compression (RLE, I think there''s also something similar for 16-bit bitmaps), and RLE isn''t at all the best compression method around (then again they''re all situation-dependent, I guess), then such formats as JPEG (lossy) and GIF (lossless) are often preferred over conventional bitmaps. However, while being smaller in size, they generally also take longer to load.

Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
Advertisement
If you want to make a transparent bitmap without an alpha channel, you just need to know the RGB of your index color, and ignore the bits with that RGB value when loading the bitmap into the texture storage class.

This topic is closed to new replies.

Advertisement