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

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

GTPD - Jungle Rumble - integrate into GTP SVN structure

Line 
1#pragma once
2#include <vector>
3#include <string>
4#include "NodeFilter.h"
5#include "Vector.h"
6
7class Scene;
8class Renderer;
9
10//Größe des Arrays
11#define SIZEOFCMD 3
12
13class RenderPass
14{
15public:
16        RenderPass(void);
17        ~RenderPass(void);
18       
19        void setRenderer(Renderer* _renderer);
20
21        void setSafeAndRestoreRenderTarget(bool _safeRenderTarget);
22        void setRenderTarget(LPDIRECT3DSURFACE9 _renderTarget);
23        void setDepthStencilSurface(LPDIRECT3DSURFACE9 _depthStencilSurface);
24       
25        void setViewMatrix(D3DXMATRIX &_viewMat);
26        void setProjectionMatrix(D3DXMATRIX &_projMat);
27        void setScene(Scene &_scene);
28
29        static const int CMD_CLEARRENDERTARGETANDZBUFFER        = 0;
30        static const int CMD_DOFRUSTUMCULLING                           = 1;
31        static const int CMD_RENDERNODES                                        = 2;
32        void execute(int command, bool _execute=true);
33
34        void executePass();
35
36        D3DXMATRIX* getViewMatrix();
37        D3DXMATRIX* getProjectionMatrix();
38        D3DXMATRIX* getViewProjectionMatrix();
39        D3DXMATRIX getWorldViewMatrix(D3DXMATRIX *worldMat);
40        D3DXMATRIX getWorldViewProjectionMatrix(D3DXMATRIX *worldMat);
41
42        void setRenderPassId(int _passId);
43        int getRenderPassId();
44        void useThisRendererList(std::vector<Renderer *>* _otherList);
45
46        void calculateMatrices();
47        std::vector<Renderer *>* usedRendererList;
48        LPDIRECT3DSURFACE9 renderTarget;
49protected:
50        std::vector<Renderer *> myRendererList;
51        Scene* scene;
52        Renderer* renderer;
53        IDirect3DDevice9* device;
54
55        bool safeRenderTarget;
56        LPDIRECT3DSURFACE9      renderTargetSurfaceOld;
57        LPDIRECT3DSURFACE9      depthStencilSurfaceOld;
58
59       
60        LPDIRECT3DSURFACE9 dephStencilSurface;
61       
62        D3DXMATRIX viewMat;
63        D3DXMATRIX projMat;
64        D3DXMATRIX viewProjMat;
65
66        bool executeCommand[SIZEOFCMD];
67        int renderPassId;
68};
Note: See TracBrowser for help on using the repository browser.