📄 main.h
字号:
//-----------------------------------------------------------------------------
// Name: Basic Direct 3D Framework application w/ Object loading code
//
// Description: Example code showing how to create a basic 3D application,
// load a 3DSMAX exported file in .x format, and render it.
//
// File Function: Header file for the program (main.h)
//
// Code:
// Copyright (c) 2002 LostLogic Corporation. All rights reserved.
//
// Original D3D Application Shell Code:
// Copyright (c) 1997-2001 Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#define STRICT
#include <windows.h>
#include <commctrl.h>
#include <commdlg.h>
#include <math.h>
#include <tchar.h>
#include <stdio.h>
#include <D3DX9.h>
#include "DXUtil.h"
#include "D3DEnumeration.h"
#include "D3DSettings.h"
#include "D3DApp.h"
#include "D3DFont.h"
#include "D3DFile.h"
#include "D3DUtil.h"
//-----------------------------------------------------------------------------
// Desc: Application class. The base class (CD3DApplication) provides the
// generic functionality needed in all Direct3D samples. CD3DFramework
// adds functionality specific to this sample program.
//-----------------------------------------------------------------------------
class CD3DFramework : public CD3DApplication
{
CD3DFont* m_pStatsFont;
TCHAR m_strFont[LF_FACESIZE];
DWORD m_dwFontSize;
CD3DMesh* m_pObject;
protected:
HRESULT OneTimeSceneInit();
HRESULT InitDeviceObjects();
HRESULT RestoreDeviceObjects();
HRESULT InvalidateDeviceObjects();
HRESULT DeleteDeviceObjects();
HRESULT Render();
HRESULT FrameMove();
HRESULT FinalCleanup();
HRESULT CreateD3DXTextMesh( LPD3DXMESH* ppMesh, TCHAR* pstrFont, DWORD dwSize );
public:
LRESULT MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
CD3DFramework();
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -