doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
idVertexCache Class Reference

#include <VertexCache.h>

Public Member Functions

void Init ()
 
void Shutdown ()
 
bool IsFast ()
 
void PurgeAll ()
 
void Alloc (void *data, int bytes, vertCache_t **buffer, bool indexBuffer=false)
 
voidPosition (vertCache_t *buffer)
 
void UnbindIndex ()
 
vertCache_tAllocFrameTemp (void *data, int bytes)
 
void Touch (vertCache_t *buffer)
 
void Free (vertCache_t *buffer)
 
void EndFrame ()
 
void List ()
 

Private Member Functions

void InitMemoryBlocks (int size)
 
void ActuallyFree (vertCache_t *block)
 

Private Attributes

int staticCountTotal
 
int staticAllocTotal
 
int staticAllocThisFrame
 
int staticCountThisFrame
 
int dynamicAllocThisFrame
 
int dynamicCountThisFrame
 
int currentFrame
 
int listNum
 
bool virtualMemory
 
bool allocatingTempBuffer
 
vertCache_ttempBuffers [NUM_VERTEX_FRAMES]
 
bool tempOverflow
 
idBlockAlloc< vertCache_t, 1024 > headerAllocator
 
vertCache_t freeStaticHeaders
 
vertCache_t freeDynamicHeaders
 
vertCache_t dynamicHeaders
 
vertCache_t deferredFreeList
 
vertCache_t staticHeaders
 
int frameBytes
 

Static Private Attributes

static idCVar r_showVertexCache
 
static idCVar r_vertexBufferMegs
 

Detailed Description

Definition at line 55 of file VertexCache.h.

Member Function Documentation

void idVertexCache::ActuallyFree ( vertCache_t block)
private

Definition at line 57 of file VertexCache.cpp.

void idVertexCache::Alloc ( void data,
int  bytes,
vertCache_t **  buffer,
bool  indexBuffer = false 
)

Definition at line 227 of file VertexCache.cpp.

vertCache_t * idVertexCache::AllocFrameTemp ( void data,
int  bytes 
)

Definition at line 370 of file VertexCache.cpp.

void idVertexCache::EndFrame ( )

Definition at line 437 of file VertexCache.cpp.

void idVertexCache::Free ( vertCache_t buffer)

Definition at line 336 of file VertexCache.cpp.

void idVertexCache::Init ( void  )

Definition at line 153 of file VertexCache.cpp.

void idVertexCache::InitMemoryBlocks ( int  size)
private
bool idVertexCache::IsFast ( )

Definition at line 558 of file VertexCache.cpp.

void idVertexCache::List ( void  )

Definition at line 505 of file VertexCache.cpp.

void * idVertexCache::Position ( vertCache_t buffer)

Definition at line 115 of file VertexCache.cpp.

void idVertexCache::PurgeAll ( )

Definition at line 205 of file VertexCache.cpp.

void idVertexCache::Shutdown ( void  )

Definition at line 216 of file VertexCache.cpp.

void idVertexCache::Touch ( vertCache_t buffer)

Definition at line 307 of file VertexCache.cpp.

void idVertexCache::UnbindIndex ( )

Definition at line 141 of file VertexCache.cpp.

Member Data Documentation

bool idVertexCache::allocatingTempBuffer
private

Definition at line 126 of file VertexCache.h.

int idVertexCache::currentFrame
private

Definition at line 121 of file VertexCache.h.

vertCache_t idVertexCache::deferredFreeList
private

Definition at line 136 of file VertexCache.h.

int idVertexCache::dynamicAllocThisFrame
private

Definition at line 118 of file VertexCache.h.

int idVertexCache::dynamicCountThisFrame
private

Definition at line 119 of file VertexCache.h.

vertCache_t idVertexCache::dynamicHeaders
private

Definition at line 135 of file VertexCache.h.

int idVertexCache::frameBytes
private

Definition at line 140 of file VertexCache.h.

vertCache_t idVertexCache::freeDynamicHeaders
private

Definition at line 134 of file VertexCache.h.

vertCache_t idVertexCache::freeStaticHeaders
private

Definition at line 133 of file VertexCache.h.

idBlockAlloc<vertCache_t,1024> idVertexCache::headerAllocator
private

Definition at line 131 of file VertexCache.h.

int idVertexCache::listNum
private

Definition at line 122 of file VertexCache.h.

idCVar idVertexCache::r_showVertexCache
staticprivate

Definition at line 110 of file VertexCache.h.

idCVar idVertexCache::r_vertexBufferMegs
staticprivate

Definition at line 111 of file VertexCache.h.

int idVertexCache::staticAllocThisFrame
private

Definition at line 116 of file VertexCache.h.

int idVertexCache::staticAllocTotal
private

Definition at line 114 of file VertexCache.h.

int idVertexCache::staticCountThisFrame
private

Definition at line 117 of file VertexCache.h.

int idVertexCache::staticCountTotal
private

Definition at line 113 of file VertexCache.h.

vertCache_t idVertexCache::staticHeaders
private

Definition at line 137 of file VertexCache.h.

vertCache_t* idVertexCache::tempBuffers[NUM_VERTEX_FRAMES]
private

Definition at line 128 of file VertexCache.h.

bool idVertexCache::tempOverflow
private

Definition at line 129 of file VertexCache.h.

bool idVertexCache::virtualMemory
private

Definition at line 124 of file VertexCache.h.


The documentation for this class was generated from the following files: