floordeck.h

来自「D3D做的天空盒地面加上了纹理混合!写的非常清晰」· C头文件 代码 · 共 46 行

H
46
字号
#pragma once
#pragma once
#include <Windows.h>
#include <mmsystem.h>
#include <d3dx9.h>
#pragma warning( disable : 4996 ) // disable deprecated warning 
#include <strsafe.h>
#pragma warning( default : 4996 ) 
#include <string>
using namespace std;

struct CUSTOMVERTEX
{
	D3DXVECTOR3 position; // The position
	D3DCOLOR    color;    // The color
#ifndef SHOW_HOW_TO_USE_TCI
	FLOAT       tu, tv;   // The texture coordinates
#endif
};

// Our custom FVF, which describes our custom vertex structure
#ifdef SHOW_HOW_TO_USE_TCI
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE)
#else
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1|D3DFVF_TEX2)
#endif

class CFloorDeck
{
public:
	LPDIRECT3DDEVICE9 m_Device;
	LPDIRECT3DTEXTURE9 m_Water[30];
	INT Number;
	LPDIRECT3DVERTEXBUFFER9 m_VB;
	LPDIRECT3DTEXTURE9      m_pFoot;

	CFloorDeck(void);
	~CFloorDeck(void);

	HRESULT InitTexture(LPDIRECT3DDEVICE9 g_pd3dDevice);
	void UpdataTime(float speed);
	void ReadData();
	void Render();
	void Matrix();
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?