首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络游戏 >

提问,暴弱智的有关问题.望高手解答

2012-03-06 
提问,暴弱智的问题.望高手解答.是这样的,我下载了DirectX9.0的SDK里面有Managed DirectX的代码示例,在Micr

提问,暴弱智的问题.望高手解答.
是这样的,我下载了DirectX9.0的SDK里面有Managed DirectX的代码示例,在
Microsoft DirectX SDK (August 2007)\Samples\Managed\Direct3D\Tutorials\Tutorial1目录中.

里面有一个

C# code
public bool InitializeGraphics()        {            try            {                // Now let's setup our D3D stuff                PresentParameters presentParams = new PresentParameters();                presentParams.Windowed = true;                presentParams.SwapEffect = SwapEffect.Discard;                device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams);                this.OnCreateDevice(device, null);                return true;            }            catch (DirectXException)            {                 return false;             }        }

初始化的全屏设置.书上说只要把presentParams.Windowed = false;就可以全屏Device了,但是却不行,能告诉我怎么做么?

谢谢大家了


[解决办法]
需要设置BackBuffer的大小如:800x600 d3dfmt_xxx

热点排行