Jump to content

  • Log In with Google      Sign In   
  • Create Account

vertices defined clockwise/counter-clockwise


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 oreste   Members   -  Reputation: 149

Like
0Likes
Like

Posted 28 July 2014 - 04:57 PM

Windows 7 VS 2013 express directx june 2010 In one tutorial lesson the code renders a triangle made up of transformed vertices. Vertices are defined in a clockwise fashion, this being the default in directx. If I define them in a counter-clockwise order the triangle isn't rendered. In the next lesson we go thru the geometry pipeline, so we start w/ untransformed vertices. Here the order in which the vertices are defined doesn't seem to matter the triangle is rendered. WHY? Note: I plotted these vertices in model space on a cartesian coordinate system (0,0) Where X and y intersect. To the right of (0,0) X is >0, and above (0,0) Y is >0. The z coordinate is the same for each vertice, so essentially the triangle is 2D. The next lesson is entitled "Rendering depth" that's where w'ell take care of z w/ & the zbuffer.

Sponsor:

#2 NumberXaero   Prime Members   -  Reputation: 1507

Like
0Likes
Like

Posted 28 July 2014 - 06:01 PM

Probably because the code changed the cull mode state somewhere before rendering, or disabled culling.

SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW);

Edited by NumberXaero, 28 July 2014 - 06:02 PM.


#3 oreste   Members   -  Reputation: 149

Like
0Likes
Like

Posted 28 July 2014 - 09:19 PM

Thanx for your answer. For me that means that the problems lies w/ me. Cull mode is not modified in the code! I thought that the error might be how i plotted the vertices in model space (2D cartesian coordinates)! I'll work on it more. Thanx again!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS