# Thread: textures and surfaces

1. ## textures and surfaces

Hi,
I have two surfaces that I would like to texture.The texture, however,
needs to cover only half of the surface in width but the full height of
each surface. I am not sure what is the best way to do this. Any help is
appreciated...

2. ## Re: textures and surfaces

the texture coordinates goes from 1.0 to 0.0 for a reason!

if you want half the width and the full height.

0.0, 1.0 0.5,1.0

0.0,0.0 0.5,0.0

3. ## Re: textures and surfaces

Hi Gorg,
Thanks for taking the time to respond to my post.
I don't think I explained my question properly. I have a surface that I
want to place a texture on. I want the whole texture to be placed over
just half of the surface (half of the width and the whole height). I am
not sure if there is an easy way to do this. What I tried already is the
following. I wrote the equation for the surface, computed new control
points for a surface that will just cover half of the original surface.
The problem here is that I can never generate the actual half of the
surface (unless the surface is flat, which it isn't) because the curves
are tanget at the end points but only approach the points in between. So,
If you can think of an easier way of doing this I would really appreciate
the help.

4. ## Re: textures and surfaces

ho! ok, sorry, I misread the question.

What you could do, is create a texture with an alpha channel. Make the first half of the texture your real textures and set the alpha to 255. And for the other part, use an alpha of 0.

The blending equation you will have to use is:
gl_src_alpha, gl_one_minus_src_alpha

do normal texturing with the coordinates from 0.0 to 1.0

[This message has been edited by Gorg (edited 03-28-2000).]

[This message has been edited by Gorg (edited 03-28-2000).]

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•