📄 cgdevice.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -