|
36 | 36 | #include "dx8vertexbuffer.h" |
37 | 37 | #include "dx8indexbuffer.h" |
38 | 38 |
|
39 | | -#define MAX_VB_SIZES 128 //number of different sized VB slots allowed. |
40 | | -#define MIN_SLOT_SIZE 32 //minimum number of vertices allocated per slot (power of 2). See also MIN_SLOT_SIZE_SHIFT. |
41 | | -#define MIN_SLOT_SIZE_SHIFT 5 //used for division by MIN_SLOT_SIZE |
42 | | -#define MAX_VERTEX_BUFFERS_CREATED 32 //maximum number of D3D vertex buffers allowed to create per vertex type. |
43 | | -#define DEFAULT_VERTEX_BUFFER_SIZE 8192 //this size ends up generating VB's of about 256Kbytes |
44 | | -#define MAX_NUMBER_SLOTS 4096 //maximum number of slots that can be allocated. |
45 | | - |
| 39 | +// TheSuperHackers @info The max sizes correspond to a number of vertices and indices of a mesh casting shadows |
| 40 | +// in the scene. The more vertices the meshes are supposed to have, the higher these limits need to be. |
| 41 | +// Multiplying these numbers by MIN_SLOT_SIZE gives the max supported amount of vertices and indices. |
| 42 | +#define MAX_VB_SIZES 128 //number of different sized VB slots allowed. |
46 | 43 | #define MAX_IB_SIZES 128 //number of different sized IB slots allowed (goes all the way up to 65536) |
47 | | -#define MAX_INDEX_BUFFERS_CREATED 32 |
48 | | -#define DEFAULT_INDEX_BUFFER_SIZE 32768 |
| 44 | + |
| 45 | +#define MIN_SLOT_SIZE_SHIFT 5 //used for division by MIN_SLOT_SIZE |
| 46 | +#define MIN_SLOT_SIZE (1 << MIN_SLOT_SIZE_SHIFT) //minimum number of vertices allocated per slot (power of 2). |
| 47 | + |
| 48 | +// TheSuperHackers @info The number of slots corresponds to number of meshes casting shadows in the scene. |
| 49 | +// The more meshes there are, the larger the slots needs to be. |
| 50 | +// TheSuperHackers @tweak Double the original sizes to allow for twice as many shadows to be created in the scene. |
| 51 | +#define SLOTS_MULTIPLIER 2 |
| 52 | +#define MAX_NUMBER_SLOTS (4096 * SLOTS_MULTIPLIER) //maximum number of slots that can be allocated. |
| 53 | +#define MAX_VERTEX_BUFFERS_CREATED (32 * SLOTS_MULTIPLIER) //maximum number of D3D vertex buffers allowed to create per vertex type. |
| 54 | +#define MAX_INDEX_BUFFERS_CREATED (32 * SLOTS_MULTIPLIER) |
| 55 | + |
| 56 | +#define DEFAULT_VERTEX_BUFFER_SIZE 8192 //this size ends up generating VB's of about 256Kbytes |
| 57 | +#define DEFAULT_INDEX_BUFFER_SIZE 32768 |
49 | 58 |
|
50 | 59 | class W3DBufferManager |
51 | 60 | { |
|
0 commit comments