Advertisement Jump to content
  • Advertisement

d3dnub

Member
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

122 Neutral

About d3dnub

  • Rank
    Newbie
  1. ok i think i should be able to figure it out what i wasnt to sure of was the number of loops needed but reading another post in the openGL section i see that im going to need a loop for getting face normals then a loop through all the verts then a loop through all the faces then check all the verts to see if they are used in the face add them and average them correct? didnt realize it needed so many loops..figured this would be to slow for advanced models
  2. ok so i know to get a face normal i use the N = U x V but im having trouble actually looping through and getting all the triangles in my array so i can grab two vectors from a triangle to compute this is the array im using float Verts[][3] = { -10.0f,0.0f,20.0f, -10.0f,5.0f,20.0f, -10.0f,0.0f, 0.0f, -10.0f,5.0f, 0.0f, 10.0f,0.0f, 0.0f, 10.0f,5.0f, 0.0f, 10.0f,0.0f,20.0f, 10.0f,5.0f,20.0f, 5.0f,0.0f,20.0f, 5.0f,5.0f,20.0f, 5.0f,0.0f,25.0f, 5.0f,5.0f,25.0f, -5.0f,0.0f,25.0f, -5.0f,5.0f,25.0f, -5.0f,0.0f,20.0f, -5.0f,5.0f,20.0f, -10.0f,0.0f,20.0f, -10.0f,5.0f,20.0f,}; and im using the D3DPT_TRIANGLESTRIP type when i draw it any help would be appreciated.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!