Whats more suited to d3d C# C++

R

Ron Vecchi

I recently picked up a Managed Direct 3d book and the examples are in c++.
I've always used C# and wonder if c++ is more suited to Direct 3D
programming. Of course I know they both access the same framework so I'm
thinking their is no difference. But, it seems all examples either on the
net or in books are always in c++, Is this because of tradition seeing that
before c#, c++ was the better alternative? Or am I safe to just convert the
code and move on with c#
 
H

Hermit Dave

well Ron,

most executive services are written in C# and stuff like directX still have
its api's to the pre .Net era....
for that reason yes you would have most sample's in c++ but to create an
equivalent example in C# shouldnt be that big a deal... except for
pointers... maybe you should settle for ref whenever you see a pointer

hope this helps
 
R

Rob Teixeira [MVP]

The DirectX framework isn't really part of the .NET framework, nor is it
written to IL. It is native COM, and designed specifically for C++.
The Managed DX framework is really a wrapper for .NET languages like C# and
VB.NET to allow them access to the DirectX framework.
If you are using C++, there is no reason to use the managed wrappers, which
leads me to question the material in that book. MSDN has some good resouces
and samples for the Managed DX framework. If you download the managed DX
framework SDK, you should get the material you need.

-Rob Teixeira [MVP]
 
B

Bob Powell [MVP]

There is a very small performance hit working through the managed wrapers in
C# or VB but if you're comfortable with C# and you like the hassle free
programming of the managed system stick with C#.

--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Read my Blog at http://bobpowelldotnet.blogspot.com
 
L

Lynn Harrison

If you are comfortable with C# then Manafed DirectX is the way to go. For a
minimal performance hit you get a much cleaner interface to the DirectX API.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top