当前位置:编程学习 > C#/ASP.NET >>

求 asp.net网页下开发 DirectX 应用程序的例子

求   asp.net网页下开发   DirectX   应用程序的例子
重重有谢!给分 --------------------编程问答-------------------- http://blog.bossma.cn/archives/2009/09/271 --------------------编程问答-------------------- 你可以看看http://blog.bossma.cn/archives/2009/09/271 --------------------编程问答-------------------- 我先试试看能否行得通,因为涉及到asp.net使用directx的权限问题!无论如何,谢谢! --------------------编程问答-------------------- 我按照你的办法运行程序后出现错误信息如下:

************** 异常文本 **************
应用程序中的错误。
-2005530518 (D3DERR_NOTAVAILABLE)
   在 Microsoft.DirectX.Direct3D.Device..ctor(Int32 adapter, DeviceType deviceType, Control renderWindow, CreateFlags behaviorFlags, PresentParameters[] presentationParameters)
   在 HelloCylinder.HelloCylinderActiveX.InitializeGraphics3D() 位置 C:\newcode\ActiveXCAB\HelloCylinder\HelloCylinder\HelloCylinderActiveX.cs:行号 134
   在 HelloCylinder.HelloCylinderActiveX.OnPaint(PaintEventArgs e) 位置 C:\newcode\ActiveXCAB\HelloCylinder\HelloCylinder\HelloCylinderActiveX.cs:行号 297
   在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   在 System.Windows.Forms.Control.WmPaint(Message& m)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
   在 System.Windows.Forms.UserControl.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ActiveXImpl.System.Windows.Forms.IWindowTarget.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


new Device(Int32 adapter, DeviceType deviceType, Control renderWindow, CreateFlags behaviorFlags, PresentParameters[] presentationParameters)

我的代码    PresentParameters presentParams = new PresentParameters();
            presentParams.Windowed = true;
            presentParams.SwapEffect = SwapEffect.Discard;
            
            //PresentParameters[] presentParamsArray;
            //presentParamsArray[0] = presentParams;

_mDevice = new Device(0, DeviceType.Hardware, this,  
        CreateFlags.SoftwareVertexProcessing, presentParams);

D3DERR_NOTAVAILABLE是什么意思?是Device构造函数中adapter不能为0吗?
还是最后一个参数必须为PresentParameters类的数组PresentParameters[]?
第三个参数this能否指向网页中<object>标签代表的ActiveX用户控件?可能第三个参数this只能指向一个Windows窗口句柄?
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,