Re: Looping textures

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"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.


.



Relevant Pages

  • Looping textures
    ... I've created an object in my vertex buffer which forms a tube around the ... I've wrapped a texture on to the tube, and it looks fine, but because the ... so that in this section the texture coordinates will range from 0.9 to ...
    (microsoft.public.win32.programmer.directx.graphics)
  • ot: Mister Softee
    ... Merchant made some hysterical training films for ... They popped up on You Tube this month. ... The latest rumor is that Microsoft has "started an investigation after ... Faux Trainging Video Part II ...
    (alt.guitar.amps)
  • Quote Database Queries
    ... WE are currently using Microsoft R Access 97 and are ... having a problem when we enter our customers sizes we put ... the smallest tube size first and when we hit save and ...
    (microsoft.public.access.tablesdbdesign)