Sign in to follow this  
CodeIX

SlimDX - Beginner 2D game tutorials?

Recommended Posts

Hey all, i am actually looking for a SlimDX 2D Game tutorials. The reason is that i have many GDI+ game i want to port to SlimDX but i never worked with DirectX before so i have absolutly no clue where to start for all the device thing and whats the common gameloop to use. Or can someone give me an exemple of a good gameloop and device initialization using SlimDX? That would be a lot of help. I am open to all suggestions and link. Thanks in advance! :) [Edited by - CodeIX on March 21, 2010 9:55:00 PM]

Share this post


Link to post
Share on other sites
In a DirectX9 docs, i have this instructions:

---
device.Transform.View = Matrix.LookAtLH ( new Vector3 ( 0, 0, 5f ),
new Vector3 ( 0, 0, 0 ), new Vector3 ( 0, 1, 0 ) );
---

What is the actual equivalent in SlimDX? What do i write in order to replace the
"device.Transform.View" part? Is it a reference to the viewport?

Thanks in advance!

Share this post


Link to post
Share on other sites
I did it like this:

---
Matrix mx = new Matrix();
mx = Matrix.LookAtLH(new Vector3(0, 0, 5f), new Vector3(0, 0, 0), new Vector3(0, 1, 0));
displayDevice.SetTransform(TransformState.View, mx);
---

Look right?

Sorry i am still pretty new to all the directx thing world.

Share this post


Link to post
Share on other sites
Trying to get into the 2D World of DirectX but it is a lot of new concept to assimilate. Nothing impossible but its impressive how it is a world of itself.

Using Direct3D for 2D design is a bit hard to understand some time, even if i am an experienced application developer.

Now i wonder, does the XNA Tutorials on the web could be of help for a DirectX beginner like me? Or does the syntax and method name are too different from XNA(D9) and SlimDX to even be able to figure out the difference?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this