Source key in OpenGL ?

Started by
12 comments, last by Mercury_Linx 22 years, 11 months ago
You may want to consider writing a small wrapper function for the loader, like:

Load_Masked_Texture(char *Filename, BYTE r, BYTE g, BYTE b);

the r g and b would be 0-255, and would specify the color to be masked out..

You''re going to have to write the loading code anyway, you might as well make a nice interface to do it for any color..

Sorry if this one''s obvious, but I felt it was worth mentioning



"Like all good things, it starts with a monkey.."
"Like all good things, it starts with a monkey.."
Advertisement
Thank you all for helping me figure out about the loading part

By the way, is it true that it does not matter what type of images that I''m loading, but as long as I have it properly convert into a byte string :

i.e: RGBARGBARGBARGBARGBARGBARGBARGBARGBARGBARGBARGBA

Then it''ll be ready to be blit onto a surface or as a texture in both OpenGL and DirectX ?



...
A programmer, is the soul creator for computers.
...A programmer, is the soul creator for computers.

You should read some example-code to understand how to texture map a polygon and on this topic there are A LOT OF tutorials!
However you have understood what exactly an image is : a byte buffer! And of course the first step to create a texture is the image that describes it.


IpSeDiXiT
Thanks guys It helps ...

...
A programmer, is the soul creator for computers.
...A programmer, is the soul creator for computers.

This topic is closed to new replies.

Advertisement