source: GTP/trunk/App/Games/Jungle_Rumble/src/SimpleMeshRenderer.h @ 1378

Revision 1378, 1.0 KB checked in by giegl, 18 years ago (diff)

GTPD - Jungle Rumble - integrate into GTP SVN structure

Line 
1#pragma once
2#include "renderer.h"
3#include "Object3d.h"
4
5// Our custom FVF, which describes our custom vertex structure
6        #define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE)
7
8// A structure for our custom vertex type
9        struct CUSTOMVERTEX
10        {
11                FLOAT x, y, z;      // The untransformed, 3D position for the vertex
12                DWORD color;        // The vertex color
13        };
14
15class SimpleMeshRenderer :
16        public Renderer
17{
18public:
19        SimpleMeshRenderer(void);
20        virtual ~SimpleMeshRenderer(void);
21
22        virtual void init();
23        virtual void render();
24
25        void enableAlphaBlending(bool _alpha);
26
27        virtual void OnLostDevice( void* pUserContext );
28        virtual void OnDestroyDevice( void* pUserContext );
29        virtual HRESULT OnResetDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext );
30       
31        virtual bool isLowerThan(Renderer* renderer);
32
33protected:
34
35        void defaultPass();
36        void depthPass();
37        void rayPass();
38        bool alphaBlending;
39        ID3DXEffect* effect;
40        ID3DXEffect* rayEffect;
41};
Note: See TracBrowser for help on using the repository browser.