Skip to main content
gamedev.net
🔒 Locked

Texture Coord Problems

Started by HedCrash 2 replies 300+ views
Original Post
HedCrash
HedCrash
I''m having trouble trying to figure out what the texture coords for these verts are suppose to be. Can anyone help? for(iRows = -Height *.5f; iRows < Height * .5f; iRows +=Step) { thePlane[count].Pos.x = -Width * .5f; thePlane[count].Pos.y = 0.0f; thePlane[count].Pos.z = iRows; thePlane[count].UVCoord.x = 0; thePlane[count].UVCoord.y = 0; count++; for(iCols = -Width *.5f; iCols <= Width * .5f; iCols += Step) { thePlane[count].Pos.x = iCols; thePlane[count].Pos.y = 0.0f; thePlane[count].Pos.z = iRows; thePlane[count].UVCoord.x = iCols; thePlane[count].UVCoord.y = iRows; count++; thePlane[count].Pos.x = iCols; thePlane[count].Pos.y = 0.0f; thePlane[count].Pos.z = iRows + Step; thePlane[count].UVCoord.x = iCols; thePlane[count].UVCoord.y = iRows + Step; count++; } thePlane[count] = thePlane[count - 1]; count++;
cowsarenotevil
cowsarenotevil
You''re not drawing any vertices, so it''s pretty much impossible to tell what the texture coordinates would be. What exactly are you trying to achieve?

-~-The Cow of Darkness-~-
Cifko
Cifko
You are generating each vertex and uv two times, why?
When you render wire is it ok?


HedCrash
HedCrash
This alg. produces a set of verts along with delinquent verts for triangle strips, so that you can send it all in as one batch of primitives.

Nevermind i figured it out. thanks for the try though.

[edited by - HedCrash on February 3, 2004 7:44:34 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.