Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,25 @@
#include "dx8vertexbuffer.h"
#include "dx8indexbuffer.h"

#define MAX_VB_SIZES 128 //number of different sized VB slots allowed.
#define MIN_SLOT_SIZE 32 //minimum number of vertices allocated per slot (power of 2). See also MIN_SLOT_SIZE_SHIFT.
#define MIN_SLOT_SIZE_SHIFT 5 //used for division by MIN_SLOT_SIZE
#define MAX_VERTEX_BUFFERS_CREATED 32 //maximum number of D3D vertex buffers allowed to create per vertex type.
#define DEFAULT_VERTEX_BUFFER_SIZE 8192 //this size ends up generating VB's of about 256Kbytes
#define MAX_NUMBER_SLOTS 4096 //maximum number of slots that can be allocated.

// TheSuperHackers @info The max sizes correspond to a number of vertices and indices of a mesh casting shadows
// in the scene. The more vertices the meshes are supposed to have, the higher these limits need to be.
// Multiplying these numbers by MIN_SLOT_SIZE gives the max supported amount of vertices and indices.
#define MAX_VB_SIZES 128 //number of different sized VB slots allowed.
#define MAX_IB_SIZES 128 //number of different sized IB slots allowed (goes all the way up to 65536)
#define MAX_INDEX_BUFFERS_CREATED 32
#define DEFAULT_INDEX_BUFFER_SIZE 32768

#define MIN_SLOT_SIZE_SHIFT 5 //used for division by MIN_SLOT_SIZE
#define MIN_SLOT_SIZE (1 << MIN_SLOT_SIZE_SHIFT) //minimum number of vertices allocated per slot (power of 2).

// TheSuperHackers @info The number of slots corresponds to number of meshes casting shadows in the scene.
// The more meshes there are, the larger the slots needs to be.
// TheSuperHackers @tweak Double the original sizes to allow for twice as many shadows to be created in the scene.
#define SLOTS_MULTIPLIER 2
#define MAX_NUMBER_SLOTS (4096 * SLOTS_MULTIPLIER) //maximum number of slots that can be allocated.
#define MAX_VERTEX_BUFFERS_CREATED (32 * SLOTS_MULTIPLIER) //maximum number of D3D vertex buffers allowed to create per vertex type.
#define MAX_INDEX_BUFFERS_CREATED (32 * SLOTS_MULTIPLIER)

#define DEFAULT_VERTEX_BUFFER_SIZE 8192 //this size ends up generating VB's of about 256Kbytes
#define DEFAULT_INDEX_BUFFER_SIZE 32768

class W3DBufferManager
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,25 @@
#include "dx8vertexbuffer.h"
#include "dx8indexbuffer.h"

#define MAX_VB_SIZES 128 //number of different sized VB slots allowed.
#define MIN_SLOT_SIZE 32 //minimum number of vertices allocated per slot (power of 2). See also MIN_SLOT_SIZE_SHIFT.
#define MIN_SLOT_SIZE_SHIFT 5 //used for division by MIN_SLOT_SIZE
#define MAX_VERTEX_BUFFERS_CREATED 32 //maximum number of D3D vertex buffers allowed to create per vertex type.
#define DEFAULT_VERTEX_BUFFER_SIZE 8192 //this size ends up generating VB's of about 256Kbytes
#define MAX_NUMBER_SLOTS 4096 //maximum number of slots that can be allocated.

// TheSuperHackers @info The max sizes correspond to a number of vertices and indices of a mesh casting shadows
// in the scene. The more vertices the meshes are supposed to have, the higher these limits need to be.
// Multiplying these numbers by MIN_SLOT_SIZE gives the max supported amount of vertices and indices.
#define MAX_VB_SIZES 128 //number of different sized VB slots allowed.
#define MAX_IB_SIZES 128 //number of different sized IB slots allowed (goes all the way up to 65536)
#define MAX_INDEX_BUFFERS_CREATED 32
#define DEFAULT_INDEX_BUFFER_SIZE 32768

#define MIN_SLOT_SIZE_SHIFT 5 //used for division by MIN_SLOT_SIZE
#define MIN_SLOT_SIZE (1 << MIN_SLOT_SIZE_SHIFT) //minimum number of vertices allocated per slot (power of 2).

// TheSuperHackers @info The number of slots corresponds to number of meshes casting shadows in the scene.
// The more meshes there are, the larger the slots needs to be.
// TheSuperHackers @tweak Double the original sizes to allow for twice as many shadows to be created in the scene.
#define SLOTS_MULTIPLIER 2
#define MAX_NUMBER_SLOTS (4096 * SLOTS_MULTIPLIER) //maximum number of slots that can be allocated.
#define MAX_VERTEX_BUFFERS_CREATED (32 * SLOTS_MULTIPLIER) //maximum number of D3D vertex buffers allowed to create per vertex type.
#define MAX_INDEX_BUFFERS_CREATED (32 * SLOTS_MULTIPLIER)

#define DEFAULT_VERTEX_BUFFER_SIZE 8192 //this size ends up generating VB's of about 256Kbytes
#define DEFAULT_INDEX_BUFFER_SIZE 32768

class W3DBufferManager
{
Expand Down
Loading