2

I have no idea about DirectX and didn't ever work with that. I want load my object from 3dMax and have lighting and camera. I don't need animation. I just want to move the camera around the object. I have some experiences in C# and know this language. I don't want use game engines. where should I start? Is there any tutorial in C# (not c++) for directx?

David
  • 15,894
  • 22
  • 55
  • 66
Loghman
  • 1,500
  • 1
  • 14
  • 30
  • If you just wish to render that, you are not confined within DirectX, you can try using OpenGL in C#, using Tao Framework, OpenTK etc. – David Sep 26 '13 at 11:41
  • Go with SharpDX... its effortless – Meirion Hughes Sep 26 '13 at 11:42
  • DirectX is a set of APIs for Windows video/audio/sound. If you want to build a game then try a game engine like [Unity3D](http://unity3d.com/) (supports C#) or a framework like [MonoGame](http://www.monogame.net/). Building a game engine is a lot of work (2-3 years worth of solo weekend development) and you will not produce a game as fast. – Dustin Kingen Sep 26 '13 at 11:42
  • I don't want make game now. maybe game engines can solve my problem. but I think those are more complected than the thing that I want and I prefer learn how to use directx itself. because maybe I spend a period of time on an engine and I get good result in beginning but it may not suitable for next steps that I wish to achieve. – Loghman Sep 26 '13 at 14:35

2 Answers2

2

The directX SDK doesn't support C# natively and there is no native support in C# for any DirectX functionality.

But there are wrappers you could use, most commonly used project is http://sharpdx.org/. Though also this project requires you to have some knowledge about how to use the DirectX API, it is not an easy task to get something up and running!

Anyways it might be worth a try ;)

And yes, if you download the SharpDX stuff, there are tons of examples coming with the package.

Instead of doing it yourself from scratch I would suggest to look into this response C# 3d model viewer

or maybe have a try with the free version of the Unity3d engine http://unity3d.com/.

Community
  • 1
  • 1
MichaC
  • 13,104
  • 2
  • 44
  • 56
  • Unity3d is an overkill for such simple apps. – David Sep 26 '13 at 11:42
  • yep agree, also found this post here: http://stackoverflow.com/questions/16269665/c-sharp-3d-model-viewer this might be actually what he needs – MichaC Sep 26 '13 at 11:45
  • hmm. SharpDX, SlimDX, and from the link that Ela has given Helix 3D Toolkit are seems nice. I just installed SharpDX and checked this first hello world project. it is a space ship :D nice one. but is it really hard to use this? I don't have problem to learn directx. is it hard to learn that? :/ I should try to understand which one has a future and worth to learn. I think from now till tomorrow I should decide about these nice stuffs that you presented :) thx – Loghman Sep 26 '13 at 15:23
1

You should probably not start with DirectX itself, but consider using a pre-built 3D engine that uses DirectX and has a .Net frontend. Something like Ogre or Irrlicht.

If you really do want to use raw DirectX, take a look at SlimDX - it's a .Net wrapper around the DirectX libraries (MS doesn't offer their own managed DirectX interface anymore) with lots of tutorials available.

David
  • 15,894
  • 22
  • 55
  • 66
PhonicUK
  • 13,486
  • 4
  • 43
  • 62
  • Unity is also a good engine for beginners using c#. – Chris Pitman Sep 26 '13 at 11:39
  • in first glance I couldn't find rich tutorial for SlimDX(of course it has three starter, but it seems that's all :/ ) I should search more to understand if I am wrong about that or not. does it have any forum or something like that? SharpDX seems is the rival for SlimDX. it had forum but it closed unfortunately. – Loghman Sep 26 '13 at 15:33