texture no square surface

In opengl es I would like to use a texture, but only have a portion of it drawn.
For example I have a picture of a beach ball and I want to draw only x degrees of it as an arc. Can you fill a non rectangle shape with a rectangluar source image without distorting the image? If this isn't clear, consider the pacman character. He is a circle but not a 360 degree one. He stops short and is really like a 270 degree circle.

The short answer is yes.
Depending on what exactly you are hoping to achieve you should investigate how texture mapping works and how blending modes work. In the pacman example you give, I would draw him in a square polygon and use alpha to leave the blank space around him. If you draw a triangle it takes a triangular section out of your texture using the three coordinates you give it. Many triangles can be assembled into any shape you like.

I can't use that option. This is for dynamic arcs. So a picture of pacman, draw arc from 100 degrees to 180 degrees and you would see a yellow pie slice show up. Does that make sense? Unless i could make my texture co-ords be in the arc shape?

kendric Wrote:I can't use that option. This is for dynamic arcs. So a picture of pacman, draw arc from 100 degrees to 180 degrees and you would see a yellow pie slice show up. Does that make sense? Unless i could make my texture co-ords be in the arc shape?

If you don't have access to glu, (like if you're on the iPhone) you can have your circular shape be centered in a texture. Then, when drawing your arc, you could set up a triangle fan from the center of your shape outward. I'd just use sin and cos to get the coords in world space. Similarly, you can use sin and cos to get your texture coordinates (which, in your texture, would contain your circle shape. So the points making a circle of radius 0.5 centered at texture coordinate 0.5, 0.5.)

Sounds like you're going to have some serious pinching problems near the center. It's hard to compensate for that distortion accurately. Paul Bourke had a good page on this as it relates to sphere mapping. I had a link bookmarked but he apparently changed the site structure. I think this was the page I started with. You can dig around his site for a bunch more related spherical stuff, but the idea I'd roll with is to come up with a way of (for lack of a better term) "anti-pinching" the texture where you map it on the center of your triangle fan.

Well the pinching thing may be a problem, but I would like to see what this looks like. I tried what was suggested and have this:
-(void) drawGameArcAt:(CGPoint)center radius:(float)radius startArc:(float)startArc endArc:(float)endArc fillIn:(bool)fillIn
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
// Enable use of the texture
glEnable(GL_TEXTURE_2D);
// Set a blending function to use
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
// Enable blending
glEnable(GL_BLEND);
//Set the texture to use
Texture *texture=[textures objectAtIndex:1%frames];
[texture bind];
if (endArc < startArc)
{
float temp = endArc;
endArc = startArc;
startArc = temp;
}

I changed my sprite image and I see a definite effect. The color changed and i see one of the triangle arcs only. So its doing something. If i turn off textures, it looks the same with just white so I am prob doing something wrong in the actual strip and nothing to do with the texture itself.