   [SlimDX] Can't rotate.
  So I'm basically trying to recreate some of the old tutorials I did in MDX, however some of the basic stuff isn't responding like I think it should.  In this example I am simply drawing the tri-color triangle to screen.  That part went ok.  Then I added a rotation based on the Environment.Tick, just like an old MDX example.  However it does not move the triangle, what am I doing wrong?  Here is my render loop, with the world rotation line added to it. while (AppStillIdle){    Device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.CornflowerBlue, 1.0f, 0);    Device.BeginScene(); Device.SetTransform(TransformState.World, Matrix.RotationY(Environment.TickCount / 500f)); Device.SetStreamSource(0, Vertices, 0, 20);    Device.VertexFormat = VertexFormat.PositionRhw | VertexFormat.Diffuse;    Device.DrawPrimitives(PrimitiveType.TriangleList, 0, 1);    Device.EndScene();    Device.Present();}
  VertexFormat.PositionRhw is for transformed vertices (you are telling the pipeline to not transform them further), this shouldn't have worked in MDX 1.1 either [smile]Regards,ViLiO   ;  Ok so I switched to VertexFormat.Position, but my triangle disapears completely.I'm thinking I dont have my camera set up right.. been playing with a few different values but cant seem to see my triangle.  I'm copying from my old MDX code the best I can (switching from LH Cartesian to RH) but seem to be losing something in the translation. (need more descriptions in the SlimDX metadata)while (AppStillIdle){    Device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.CornflowerBlue, 1.0f, 0);    Device.BeginScene();Device.SetTransform(TransformState.World, Matrix.Identity);    Device.SetTransform(TransformState.View, Matrix.LookAtRH(new Vector3(2.0f, 2.0f, -5.0f), new Vector3(2.0f, 2.0f, 10f), new Vector3(2.0f, 3.0f, -5.0f)));    Device.SetTransform(TransformState.Projection, Matrix.PerspectiveFovRH((float)Math.PI/4.0F, 1.0f, -4.0F, 100.0f)); Device.SetStreamSource(0, Vertices, 0, 20);    Device.VertexFormat = VertexFormat.Position | VertexFormat.Diffuse;    Device.DrawPrimitives(PrimitiveType.TriangleList, 0, 1);    Device.EndScene();    Device.Present();}[/Source][/source]   ;  I'll give you a few more pointers that should hopefully set you on the right path [smile]The matrix functions is MDX and SlimDX just wrap around their native D3DX counterparts, so for a lot of things the documentation .chm that comes with the DXSDK should still give you piles of useful information and is right at your fingertips.For Matrix.LookAtRH have a look at D3DXMatrixLookAtRH and for Matrix.PerspectiveFovRH there is D3DXMatrixPerspectiveFovRHThings to be careful with are when creating your view matrix, the up vector should be of unit length (normalized). I am not sure if the Matrix function in SlimDX will do this normalization for you, so better safe than sorry and send it one you've normalized yourself. Then for the projection matrix you will probably want a postive non-zero value for your ZNear.One last thing is culling. When you've got your camera all set up how you think it should be but stuff maybe still isn't getting rendered, chances are your triangle winding order is the wrong way and your polys are getting back face culled. I'd advise setting the CullMode renderstate to Cull.None for the time being [smile]All the best,ViLiO   