Re: Looping textures
- From: "Robert Dunlop [MS MVP]" <rdunlop@xxxxxxxx>
- Date: Thu, 1 Dec 2005 14:31:07 -0800
"Oenone" <oenone@xxxxxxxxxxx> wrote in message
news:qAKjf.7052$xP2.6503@xxxxxxxxxxxxxxxxxxxxxxx
> I've created an object in my vertex buffer which forms a tube around the
> y-axis, and I'm rendering it using DrawIndexedPrimitive, such that the
> points where the start and end of the tube meet are the same points in my
> index buffer.
>
> I've wrapped a texture on to the tube, and it looks fine, but because the
> texture's u coordinate is 0.0 at the start of my tube and 0.9 at the other
> end, the join between these two points (where the tube end joins back up
> with the tube start) repeats the entire texture, compressed into a tiny
> space and back-to-front.
>
> I'm sure I have read about an easy way of stopping the texture from doing
> this, so that in this section the texture coordinates will range from 0.9
> to 1.0, instead of 0.9 to 0.0. Have I imagined this? And if not, could
> someone remind me what I need to do?
d3dDevice->SetRenderState(D3DRS_WRAP0, D3DWRAPCOORD_0);
That'll specify that U coordinates are wrapped for texture stage 0.
--
Robert Dunlop
The X-Zone
http://www.directxzone.com/
Microsoft DirectX MVP
-------------
The opinions expressed in this message are my own personal views and do not
reflect the official views of the Microsoft Corporation.
The MVP program does not constitute employment or contractual obligation
with Microsoft.
.
- Follow-Ups:
- Re: Looping textures
- From: Oenone
- Re: Looping textures
- References:
- Looping textures
- From: Oenone
- Looping textures
- Prev by Date: Looping textures
- Next by Date: Re: Looping textures
- Previous by thread: Looping textures
- Next by thread: Re: Looping textures
- Index(es):
Relevant Pages
|