main.h

来自「<B>很多DirectX 9.0游戏编程源码例子</B>」· C头文件 代码 · 共 59 行

H
59
字号
//-----------------------------------------------------------------------------
// 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 + =
减小字号Ctrl + -
显示快捷键?