texture on triangle

Dg's icon

Hello,

I need to texture a movie on a triangular layout.
Is it possible to do that with jit.gl.mesh or else ?
How to specify the dims of the triangle for such a geometry ?

thank you.

Dg's icon

Would not it be possible ?

Wesley Smith's icon

Have you tried using the texture coordinate input (inlet 2) of jit.gl.mesh?
wes

On Thu, Mar 20, 2008 at 10:20 AM, Derrick Giscloux
wrote:
>
> Would not it be possible ?
>
>
>

Dg's icon

It seems to do it, but I'm asking how to specify that is called the
"texcoord array" (nothing about in the help file)

Could you give a little example or any trick ?
thank you so much.

Thijs Koerselman's icon

On Mon, Mar 24, 2008 at 4:02 PM, Derrick Giscloux
wrote:

>
> It seems to do it, but I'm asking how to specify that is called the
> "texcoord array" (nothing about in the help file)
>
> Could you give a little example or any trick ?
> thank you so much.
>
>
Here's a crude example. The texture coordinates need to be specified for
each vertex that you're drawing. Texture coordinates x y are specified as "s
t" to avoid confusion with position x y. If I remember correctly they range
in the y direction from 0-1 and x direction 0-aspect ratio. (0,0) is the
left bottom corner.

I think in this example the texture is stretched since I didn't adjust the
values for the aspect ratio of the texture/screen. I leave that to you. Also
I'm sure you'll find a better way to fill your matrices ;-)

Thijs

Max Patch
Copy patch and select New From Clipboard in Max.

Dg's icon

I'm going to study that.
Many, many thanks.