cgdevice.h
来自「zip压缩,解压缩 英文版本的,大家凑货看」· C头文件 代码 · 共 41 行
H
41 行
#ifndef CGDEVICE_H
#define CGDEVICE_H
#include <windows.h>
#include <d3d9.h>
#include <d3d9types.h>
#include "stduse.h"
class CManage;
class CGDevice
{
public:
HRESULT InitDevice(int width,int height,int windowed,CManage *Manage);
~CGDevice();
HRESULT Run();
static CGDevice *GetInstance();
LPDIRECT3DDEVICE9 GetDev(){return m_pd3dDevice;}
void VertexMulMatrix(D3DXVECTOR3 *pVer,D3DXMATRIX *pMat);
private:
CGDevice();
void SetPresentAsWindow();
void SetPresentAsFull();
void SetProject();
void SetViewPort();
LPDIRECT3D9 m_pD3D; //D3D类
WNDCLASS wndClass;
LPDIRECT3DDEVICE9 m_pd3dDevice;//D3D设备类
D3DPRESENT_PARAMETERS mPresentParam; //缓冲区结构类
HWND mHwnd; //窗口句柄
HINSTANCE mHinstance;
BOOL bWindowed;
int mWidth;
int mHeight;
CManage *pManage;
static LRESULT CALLBACK WindowProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
static CGDevice *Instance;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?