|
Revision 524, 1.2 KB
(checked in by Melanikus, 17 months ago)
|
|
New draw code
|
| Line | |
|---|
| 1 | #pragma once
|
|---|
| 2 | #define D3D_DEBUG_INFO
|
|---|
| 3 | #include <d3d9.h>
|
|---|
| 4 | #include "3dc.h"
|
|---|
| 5 | #include "D3D9RenderDefines.h"
|
|---|
| 6 | #include "D3D9RenderList.h"
|
|---|
| 7 | #include "D3D9ShaderList.h"
|
|---|
| 8 | #include "D3D9AVPAuxiliaryFunctions.h"
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 | /**
|
|---|
| 12 | * D3D Renderer for Direct3D9
|
|---|
| 13 | */
|
|---|
| 14 | class CD3D9Renderer
|
|---|
| 15 | {
|
|---|
| 16 | protected:
|
|---|
| 17 | /**
|
|---|
| 18 | * Pointer to our render list
|
|---|
| 19 | */
|
|---|
| 20 | CD3D9RenderList * renderList;
|
|---|
| 21 | /**
|
|---|
| 22 | * Pointer to our shader list
|
|---|
| 23 | */
|
|---|
| 24 | CD3D9ShaderList * shaderList;
|
|---|
| 25 | /**
|
|---|
| 26 | * Pointer to Direct3D Device
|
|---|
| 27 | */
|
|---|
| 28 | IDirect3DDevice9 * lpD3DDevice;
|
|---|
| 29 | /**
|
|---|
| 30 | * ViewMatrix
|
|---|
| 31 | */
|
|---|
| 32 | D3DXMATRIX viewMatrix;
|
|---|
| 33 | /**
|
|---|
| 34 | * projectionMatrix
|
|---|
| 35 | */
|
|---|
| 36 | D3DXMATRIX projMatrix;
|
|---|
| 37 | private:
|
|---|
| 38 | /**
|
|---|
| 39 | * Singleton instance
|
|---|
| 40 | */
|
|---|
| 41 | static CD3D9Renderer _instance;
|
|---|
| 42 | CD3D9Renderer(void);
|
|---|
| 43 | ~CD3D9Renderer(void);
|
|---|
| 44 | public:
|
|---|
| 45 |
|
|---|
| 46 | static CD3D9Renderer * GetInstance();
|
|---|
| 47 | /**
|
|---|
| 48 | * Initialize the renderer
|
|---|
| 49 | */
|
|---|
| 50 | void Initialise(IDirect3DDevice9 * device);
|
|---|
| 51 | /**
|
|---|
| 52 | * Creates a render item, vertex and index data from a AvP display block
|
|---|
| 53 | * roughly what ShapePipeline does
|
|---|
| 54 | */
|
|---|
| 55 | void ProcessAVPDisplayBlock(DISPLAYBLOCK * displayblock);
|
|---|
| 56 | /**
|
|---|
| 57 | * Draws all geometric data in the buffers
|
|---|
| 58 | */
|
|---|
| 59 | void DrawGeometry();
|
|---|
| 60 | /**
|
|---|
| 61 | * Sets the View/Projection matrix
|
|---|
| 62 | */
|
|---|
| 63 | void SetViewProjectionMatrix(D3DXMATRIX * projectionMatrix);
|
|---|
| 64 | };
|
|---|
| 65 |
|
|---|