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

Revision 1378, 1.2 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#include "RenderPass.h"
5#include "Vector.h"
6#include <algorithm>
7#include "Sprite.h"
8
9class SharedResourceTexture;
10
11class ParticleRenderer :
12        public Renderer
13{
14public:
15        ParticleRenderer(void);
16        ~ParticleRenderer(void);
17
18        virtual void init();
19        virtual void render();
20
21        virtual void OnLostDevice( void* pUserContext );
22        virtual void OnDestroyDevice( void* pUserContext );
23        virtual HRESULT OnResetDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext );
24
25        virtual bool isLowerThan(Renderer* renderer);
26
27        struct spriteSortFunction {
28                Vector cameraPos;
29
30                spriteSortFunction(Vector _cameraPos) {
31                        cameraPos = _cameraPos;
32                }
33
34               
35                bool operator()(Sprite* &s1, Sprite* &s2) {
36                        return s1->camDistance > s2->camDistance;
37                }
38        };
39
40        bool needHeatHazePass();
41        void renderHeatHaze();
42        virtual bool needsExtraPass();
43        void renderSingleParticle();
44
45        void setRenderSingleParticle(bool _singleParticle);
46protected:
47
48        bool singleParticle;
49        IDirect3DTexture9* depthTexture;
50        LPDIRECT3DSURFACE9 depthSurface;
51        SharedResourceTexture* sr;
52        ID3DXEffect* ParticleEffect;
53
54        float nearPlane;
55        float farPlane;
56
57        Vector cameraPos;
58};
Note: See TracBrowser for help on using the repository browser.