我是新手,有个directx9的directxdraw的问题
directxdraw如何实现在窗口中绘制动画效果呢?c#
在directx C#的sample中要不是全屏显示的动画,要不就是窗口显示的静态图片
后来在code project上找的程序也是这样。
下面是一般的程序代码:
窗口模式:
m_dDisplayDevice = new Device();
m_dDisplayDevice.SetCooperativeLevel(this, CooperativeLevelFlags.Normal);
SurfaceDescription description = new SurfaceDescription();
description.SurfaceCaps.PrimarySurface = true;
m_sFront = new Surface(description, m_dDisplayDevice);
如果将description.SurfaceCaps.Flip,description.SurfaceCaps.Complex设置为true.在new Surface时就会提示NoExclusive的错误。
另外frontsurface的draw是不是只是显示第一次画的效果?
后面在draw的似乎没有刷新上。必须用flip?