DirectX Game dev

Moderators: None (Apply to moderate this forum)
Number of threads: 86
Number of posts: 203

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Direct3D, Line.drawtransform Posted by Theon on 9 Jun 2005 at 11:31 AM
Dear all,

Sorry for the basic question, about Line drawing with drawtransform. I have tried a lot of thinks but nothings works, so my vectors will not be drawn to the screen. Is there any working samplecode with 'drawtransform' or what are going wrong ?



I use: DirectX9.0c, visual NET 2002

device.SetTransform(TransformType.Projection,
Matrix.PerspectiveFovLH(0.75f,1.0f,0.0f,100.0f));
device.SetTransform(TransformType.World,
Matrix.RotationY(0.02f));
device.SetTransform(TransformType.View,
Matrix.LookAtRH(new Vector3(0f,3f,-5f),new Vector3(0f,0f,0f),new Vector3(0f,1f,0f)));
mLine.Begin();
mLine.Draw(mvec2,Color.Blue); //WORKS
mLine.DrawTransform(new Vector3[] { new Vector3(0,0,0), new Vector3(-1f,-100f, 0), new Vector3(100f,100f, 0), new Vector3(0,0,100f), new Vector3(0,0,-100f)}, Matrix.Multiply(device.Transform.World, device.Transform.Projection), Color.Blue); // NOT WORKS
mLine.End();

Theon



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.