上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 94 下一页
摘要: #include<d3d9.h>#include<d3dx9.h>#pragma comment(lib, "d3d9.lib")#pragma comment(lib, "d3dx9.lib")#define WINDOW_CLASS "UGPDX"#define WINDOW_NAME "Template"#define WINDOW_WIDTH 640#define WINDOW_HEIGHT 480// Function Prototypes...bool InitializeD3D 阅读全文
posted @ 2011-08-19 11:09 小 楼 一 夜 听 春 雨 阅读(497) 评论(0) 推荐(0)
摘要: #include<d3d9.h>#pragma comment(lib, "d3d9.lib")#pragma comment(lib, "d3dx9.lib")#define WINDOW_CLASS "UGPDX"#define WINDOW_NAME "Blank D3D Window"// Function Prototypes...bool InitializeD3D(HWND hWnd, bool fullscreen);void RenderScene();void Shutdown(); 阅读全文
posted @ 2011-08-19 10:57 小 楼 一 夜 听 春 雨 阅读(705) 评论(0) 推荐(0)
摘要: IDirect3D* WINAPI Direct3DCreate9(UINT SDKVersion //版本号); //创建Direct3D9接口对象HRESULT IDirect3D::GetDeviceCaps(UINT Adapter, //显卡号(一般为D3DADAPTER_DEFAULT)D3DDEVTYPE DeviceType, //设备类型(一般为D3DDEVTYPE_HAL)D3DCAPS9* pCaps //返回设备功能信息); //本机显示卡功能检测HRESULT IDirect3D::GetAdapterDisplayMode(UINT Adapter, //显卡号D3 阅读全文
posted @ 2011-08-18 23:14 小 楼 一 夜 听 春 雨 阅读(2104) 评论(0) 推荐(0)
摘要: 1. for (int i=0; i<100; ++i) a[i] = m * n; 应该改成 int k = m * n;for (int i=0; i<100; ++i) a[i] = k; 2. 缓存 将频繁计算和计算代价高的计算结果存到临时变量中,这样就不用一次一次的去调用函数来计算。 3. 阅读全文
posted @ 2011-08-17 17:36 小 楼 一 夜 听 春 雨 阅读(326) 评论(0) 推荐(0)
摘要: 1. 插入 数组(已分配足够大小),vector,list,multiset插入100W个int来测试。 速度:数组>vector>list>multiset 若插入数组、vector的对象的复制构造代价很大,则存对象的指针。 2.删除 vector在尾部进行插入和删除时,速度很快;在其他位置删除和 阅读全文
posted @ 2011-08-17 11:44 小 楼 一 夜 听 春 雨 阅读(1251) 评论(0) 推荐(0)
摘要: 编译器拒绝内联虚方法,以为虚方法是运行时绑定。 阅读全文
posted @ 2011-08-16 16:02 小 楼 一 夜 听 春 雨 阅读(392) 评论(0) 推荐(0)
摘要: #include "stdafx.h"#include <windows.h>#include <MMSystem.h>#include <iostream>using namespace std;#pragma comment(lib, "winmm.lib")class Foo{public: 阅读全文
posted @ 2011-08-16 15:47 小 楼 一 夜 听 春 雨 阅读(1624) 评论(1) 推荐(0)
摘要: #include "stdafx.h"#include <windows.h>#include <MMSystem.h>#include <iostream>using namespace std;#pragma comment(lib, "winmm.lib")class Foo{public: 阅读全文
posted @ 2011-08-16 11:17 小 楼 一 夜 听 春 雨 阅读(888) 评论(0) 推荐(0)
摘要: #include "stdafx.h"#include <windows.h>#include <MMSystem.h>#include <iostream>using namespace std;#pragma comment(lib, "winmm.lib")template <typename 阅读全文
posted @ 2011-08-14 22:14 小 楼 一 夜 听 春 雨 阅读(689) 评论(1) 推荐(0)
摘要: 先贴代码: #include "stdafx.h"#include <windows.h>#include <MMSystem.h>#include <iostream>using namespace std;#pragma comment(lib, "winmm.lib")class Foo{pu 阅读全文
posted @ 2011-08-12 21:27 小 楼 一 夜 听 春 雨 阅读(799) 评论(0) 推荐(0)
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 94 下一页