mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-01-18 15:11:43 +00:00
patch by Zack Middleton (#5044)
- Fix a few comments in tr_local.h - A bit of refactoring of the cpp macros
This commit is contained in:
parent
fe1853477e
commit
dc24d7649c
1 changed files with 16 additions and 12 deletions
|
@ -39,15 +39,16 @@ typedef unsigned int glIndex_t;
|
|||
// parallel on a dual cpu machine
|
||||
#define SMP_FRAMES 2
|
||||
|
||||
// 12 bits
|
||||
// 14 bits
|
||||
// can't be increased without changing bit packing for drawsurfs
|
||||
// see QSORT_SHADERNUM_SHIFT
|
||||
#define MAX_SHADERS 16384
|
||||
#define SHADERNUM_BITS 14
|
||||
#define MAX_SHADERS (1<<SHADERNUM_BITS)
|
||||
|
||||
//#define MAX_SHADER_STATES 2048
|
||||
#define MAX_STATES_PER_SHADER 32
|
||||
#define MAX_STATE_NAME 32
|
||||
|
||||
// can't be increased without changing bit packing for drawsurfs
|
||||
|
||||
|
||||
typedef struct dlight_s {
|
||||
|
@ -821,21 +822,24 @@ compared quickly during the qsorting process
|
|||
|
||||
the bits are allocated as follows:
|
||||
|
||||
21 - 31 : sorted shader index
|
||||
11 - 20 : entity index
|
||||
2 - 6 : fog index
|
||||
//2 : used to be clipped flag REMOVED - 03.21.00 rad
|
||||
0 - 1 : dlightmap index
|
||||
//2 : used to be clipped flag REMOVED - 03.21.00 rad
|
||||
2 - 6 : fog index
|
||||
11 - 20 : entity index
|
||||
21 - 31 : sorted shader index
|
||||
|
||||
TTimo - 1.32
|
||||
17-31 : sorted shader index
|
||||
7-16 : entity index
|
||||
2-6 : fog index
|
||||
0-1 : dlightmap index
|
||||
2-6 : fog index
|
||||
7-16 : entity index
|
||||
17-30 : sorted shader index
|
||||
*/
|
||||
#define QSORT_SHADERNUM_SHIFT 17
|
||||
#define QSORT_FOGNUM_SHIFT 2
|
||||
#define QSORT_ENTITYNUM_SHIFT 7
|
||||
#define QSORT_FOGNUM_SHIFT 2
|
||||
#define QSORT_SHADERNUM_SHIFT (QSORT_ENTITYNUM_SHIFT+GENTITYNUM_BITS)
|
||||
#if (QSORT_SHADERNUM_SHIFT+SHADERNUM_BITS) > 32
|
||||
#error "Need to update sorting, too many bits."
|
||||
#endif
|
||||
|
||||
extern int gl_filter_min, gl_filter_max;
|
||||
|
||||
|
|
Loading…
Reference in a new issue