软件渲染
XP_lmq
这个作者很懒,什么都没留下…
展开
-
类继承的初始化问题
class A { public: A(int i ): m_S(i) { m_Pa =newFoo(*this); } private: int m_S ; Foo* m_Pa; } and derived class class B :public A { public: B(): A (242) : m_Pa(NULL)原创 2011-02-27 19:38:00 · 967 阅读 · 0 评论 -
'WM_MOUSEWHEEL' : undeclared identifier
<br />#if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)#define WM_MOUSEWHEEL 0x020A#endifThe WM_MOUSEWHEEL is defined as follows. Which means that you need to define the windows version greater that 0x400 (Windows NT or gr原创 2011-03-04 13:52:00 · 2041 阅读 · 0 评论 -
创建BackSurface
使用DX9创建后台缓存,通过present提交自己绘制的后台缓存信息关键:1.创建D3D时,添加以下参数:d3dpp.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER; d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8; d3dpp.BackBufferCount = 1;2.锁住后台缓存,获取pitch、bitsD3DLOCKED_RECT rect; if (FAILED(mBackSurface->Loc原创 2011-02-11 11:35:00 · 766 阅读 · 0 评论 -
warning C4819
<br />VS2005工程中,创建多个.h、.cpp文件后,编译提示warning C4819,而且是d3dtypes.h,最后通过将该文件保存,自动解决该warning原创 2011-02-13 19:48:00 · 586 阅读 · 0 评论 -
memcpy报错
<br />Unhandled exception at 0x1023ee23 (msvcr80d.dll) in xxxx.exe: 0xC0000005: Access violation writing location 0x00ed7000.<br /> <br />通过Directx9 创建后台缓存,memcpy()拷贝报错,开始找了很久都没有眉目,后来找了下原因:<br /> <br />创建DX Device时没有指定后台缓存的宽、高,值不是原来想要的,就出现了memcpy拷贝错误<br />原创 2011-02-21 13:27:00 · 2090 阅读 · 0 评论 -
添加ZBuffer
<br />1. Pipeline.h<br /> <br />// 保存顶点ZBuffer<br />void Pipeline::saveVertexsZValue(const Vertex &v1, const Vertex &v2, const Vertex &v3, floats &vec)<br />{<br /> vec.push_back(v1.position.z);<br /> vec.push_back(v2.position.z);<br /> ve原创 2011-02-22 10:52:00 · 909 阅读 · 0 评论