How do I make texture which is not a rectangular

Hi all,

How do I make a texture which is not rectangular? for example it’s a circle or an elipse? how do I specify the coordinate of (s,t) of the texture to be map to a rectangular for example?

Oh ya for more detail… actualy the texture is rectangle but only part of this texture area I’m interested. This part of texture is in the form of circle or elipse.


[This message has been edited by songeb (edited 02-19-2002).]

U just need to set the alpha channell for that texture.

Instead of using RGB textures format use RGBA, and set the Alpha value to 0 for zones you don’t want to render.

For a fast solution try to draw a filled circle, and fill the rest of the picture with a known color, for example pure red (0,255,0), while loading data from your texture do a cicle :

if (R = 0) and (G = 255) and (B = 0) then
set alpha = 0

this way you’ll get a transparent texture where original pixelmap was GREEN…

hope it helps…