Click here to Skip to main content
14,698,390 members
Home » Discussions » C#
   

C#

 
QuestionProperty Attributes Pin
cecildt30-Jul-08 1:49
Membercecildt30-Jul-08 1:49 
AnswerRe: Property Attributes Pin
Tuwing.Sabado30-Jul-08 4:36
MemberTuwing.Sabado30-Jul-08 4:36 
GeneralRe: Property Attributes Pin
cecildt30-Jul-08 4:52
Membercecildt30-Jul-08 4:52 
GeneralRe: Property Attributes Pin
Tuwing.Sabado30-Jul-08 5:10
MemberTuwing.Sabado30-Jul-08 5:10 
AnswerRe: Property Attributes Pin
Wendelius30-Jul-08 9:46
mveWendelius30-Jul-08 9:46 
GeneralRe: Property Attributes Pin
cecildt30-Jul-08 11:19
Membercecildt30-Jul-08 11:19 
GeneralRe: Property Attributes Pin
Wendelius30-Jul-08 11:23
mveWendelius30-Jul-08 11:23 
QuestionDirect3D Wrapper - C# or Managed C++ ? Pin
Kel_30-Jul-08 1:44
MemberKel_30-Jul-08 1: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:
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 1:53
MemberSimon P Stevens30-Jul-08 1:53 
AnswerRe: Direct3D Wrapper - C# or Managed C++ ? Pin
User 665830-Jul-08 2:11
MemberUser 665830-Jul-08 2:11 
AnswerRe: Direct3D Wrapper - C# or Managed C++ ? Pin
Kel_30-Jul-08 10:59
MemberKel_30-Jul-08 10:59 
AnswerRe: Direct3D Wrapper - C# or Managed C++ ? Pin
Mark Churchill30-Jul-08 18:05
MemberMark Churchill30-Jul-08 18:05 
AnswerRe: Direct3D Wrapper - C# or Managed C++ ? Pin
Kel_1-Aug-08 4:48
MemberKel_1-Aug-08 4:48 
Questioncrystal reports with dynamic column display Pin
sarilee30-Jul-08 1:33
Membersarilee30-Jul-08 1:33 
Questionversion Pin
arkiboys30-Jul-08 1:20
Memberarkiboys30-Jul-08 1:20 
AnswerRe: version Pin
DaveyM6930-Jul-08 2:02
professionalDaveyM6930-Jul-08 2:02 
GeneralRe: version Pin
arkiboys30-Jul-08 3:25
Memberarkiboys30-Jul-08 3:25 
QuestionIn which event i can read the access card [modified] Pin
V K Gupta30-Jul-08 1:16
MemberV K Gupta30-Jul-08 1:16 
AnswerRe: In which event i can read the access card Pin
stancrm30-Jul-08 1:52
Memberstancrm30-Jul-08 1:52 
GeneralRe: In which event i can read the access card Pin
V K Gupta30-Jul-08 3:37
MemberV K Gupta30-Jul-08 3:37 
GeneralRe: In which event i can read the access card Pin
carbon_golem30-Jul-08 3:47
Membercarbon_golem30-Jul-08 3:47 
QuestionConverting Dataview to a Datatable. Pin
salmonraju30-Jul-08 1:15
Membersalmonraju30-Jul-08 1:15 
AnswerRe: Converting Dataview to a Datatable. Pin
ElSpinos30-Jul-08 3:33
MemberElSpinos30-Jul-08 3:33 
GeneralRe: Converting Dataview to a Datatable. Pin
salmonraju30-Jul-08 3:43
Membersalmonraju30-Jul-08 3:43 
AnswerRe: Converting Dataview to a Datatable. Pin
Syed Shahid Hussain30-Jul-08 18:04
MemberSyed Shahid Hussain30-Jul-08 18: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.