Click here to Skip to main content
15,884,425 members
Home / Discussions / C#
   

C#

 
QuestionProperty Attributes Pin
cecildt30-Jul-08 0:49
cecildt30-Jul-08 0:49 
AnswerRe: Property Attributes Pin
Tuwing.Sabado30-Jul-08 3:36
Tuwing.Sabado30-Jul-08 3:36 
GeneralRe: Property Attributes Pin
cecildt30-Jul-08 3:52
cecildt30-Jul-08 3:52 
GeneralRe: Property Attributes Pin
Tuwing.Sabado30-Jul-08 4:10
Tuwing.Sabado30-Jul-08 4:10 
AnswerRe: Property Attributes Pin
Wendelius30-Jul-08 8:46
mentorWendelius30-Jul-08 8:46 
GeneralRe: Property Attributes Pin
cecildt30-Jul-08 10:19
cecildt30-Jul-08 10:19 
GeneralRe: Property Attributes Pin
Wendelius30-Jul-08 10:23
mentorWendelius30-Jul-08 10:23 
QuestionDirect3D Wrapper - C# or Managed C++ ? Pin
Kel_30-Jul-08 0:44
Kel_30-Jul-08 0:44 
Hello,

I'm interested in writing a managed Direct3D 9/10 wrapper on my own for learning purpose.
I pretty much aware about existing MDX (which is deprecate) and XNA (which is multiplatform, but less performant). While searching for something already existing, I found a MDX 9/10/10.1 wrapper written by Ralf Kornmann http://www.codeplex.com/MD3D10[^]
This wrapper uses Managed C++ to wrap the D3D Api, but a lot of other OpenGL wrappers, uses a standard C# InterOp syntax, decorating and Marshalling.

I have concern about performance issues so my main question is: what is actually faster, wrap Direct3D with Managed C++ or in C# using standard C# InterOp ? Is there some performance issues?
What do you think?



What I mean by C# Style wrapper:
C#
public static class DirectX
    {
        /*  IDirect3D9* Direct3DCreate9(
                 UINT SDKVersion
            );*/
        [DllImport("d3d9.dll", EntryPoint = "Direct3DCreate9", CallingConvention = CallingConvention.Winapi), SuppressUnmanagedCodeSecurity]
        [return: MarshalAs(UnmanagedType.Interface)]
        public static extern IDirect3D9 Direct3DCreate9(UInt32 SDKVersion);


    }


/* DECLARE_INTERFACE_(IDirect3D9, IUnknown)*/
    [ComVisible(true), ComImport]
    [Guid("81BDCBCA-64D4-426d-AE8D-AD0147F4275C"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IDirect3D9  // http://msdn.microsoft.com/en-us/library/bb174300(VS.85).aspx
    {
        /*  UINT GetAdapterCount(
            );*/
        [PreserveSig]
        UInt32 GetAdapterCount();

        /*  HRESULT GetAdapterDisplayMode(
               UINT Adapter,
               D3DDISPLAYMODE* pMode
            );*/
        [PreserveSig]
        int GetAdapterDisplayMode(UInt32 Adapter, [In, Out] D3DDISPLAYMODE pMode);

        ...
    }




-- Everything is possible, even the impossible! ^_^

AnswerRe: Direct3D Wrapper - C# or Managed C++ ? Pin
Simon P Stevens30-Jul-08 0:53
Simon P Stevens30-Jul-08 0:53 
AnswerRe: Direct3D Wrapper - C# or Managed C++ ? Pin
User 665830-Jul-08 1:11
User 665830-Jul-08 1:11 
AnswerRe: Direct3D Wrapper - C# or Managed C++ ? Pin
Kel_30-Jul-08 9:59
Kel_30-Jul-08 9:59 
AnswerRe: Direct3D Wrapper - C# or Managed C++ ? Pin
Mark Churchill30-Jul-08 17:05
Mark Churchill30-Jul-08 17:05 
AnswerRe: Direct3D Wrapper - C# or Managed C++ ? Pin
Kel_1-Aug-08 3:48
Kel_1-Aug-08 3:48 
Questioncrystal reports with dynamic column display Pin
sarilee30-Jul-08 0:33
sarilee30-Jul-08 0:33 
Questionversion Pin
arkiboys30-Jul-08 0:20
arkiboys30-Jul-08 0:20 
AnswerRe: version Pin
DaveyM6930-Jul-08 1:02
professionalDaveyM6930-Jul-08 1:02 
GeneralRe: version Pin
arkiboys30-Jul-08 2:25
arkiboys30-Jul-08 2:25 
QuestionIn which event i can read the access card [modified] Pin
V K Gupta30-Jul-08 0:16
V K Gupta30-Jul-08 0:16 
AnswerRe: In which event i can read the access card Pin
stancrm30-Jul-08 0:52
stancrm30-Jul-08 0:52 
GeneralRe: In which event i can read the access card Pin
V K Gupta30-Jul-08 2:37
V K Gupta30-Jul-08 2:37 
GeneralRe: In which event i can read the access card Pin
carbon_golem30-Jul-08 2:47
carbon_golem30-Jul-08 2:47 
QuestionConverting Dataview to a Datatable. Pin
salmonraju30-Jul-08 0:15
salmonraju30-Jul-08 0:15 
AnswerRe: Converting Dataview to a Datatable. Pin
ElSpinos30-Jul-08 2:33
ElSpinos30-Jul-08 2:33 
GeneralRe: Converting Dataview to a Datatable. Pin
salmonraju30-Jul-08 2:43
salmonraju30-Jul-08 2:43 
AnswerRe: Converting Dataview to a Datatable. Pin
Syed Shahid Hussain30-Jul-08 17:04
Syed Shahid Hussain30-Jul-08 17:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.