Texture on torus
- From: Wojciech Waga <my.name.with.dot@xxxxxxxxxxx>
- Date: Mon, 24 Sep 2007 18:31:04 +0000
Hi,
can anyone help me with stretching texture on torus? :)
my code is as follows:
for texture generation:
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
now my torus is covered with many copies of texture, then I'm doing that:
glMatrixMode(GL_TEXTURE);
glScalef(0.4,0.4,1);
glMatrixMode(GL_MODELVIEW);
the size is now ok, but the problem is that my texture is placed independently on both sides and adjoins on the edges, and I wanted to have whole torus covered with one square texture (suitable stretched and deformed).
Is it possible?
wojtek
.
- Follow-Ups:
- Re: Texture on torus
- From: Wolfgang Draxinger
- Re: Texture on torus
- Prev by Date: Google map-like bitmap problem.
- Next by Date: Re: Google map-like bitmap problem.
- Previous by thread: Google map-like bitmap problem.
- Next by thread: Re: Texture on torus
- Index(es):
Relevant Pages
|