Panda3D
|
Caches a GeomPrimitive in the DirectX device as an index buffer. More...
#include "dxIndexBufferContext8.h"
Public Member Functions | |
DXIndexBufferContext8 (PreparedGraphicsObjects *pgo, GeomPrimitive *data) | |
void | create_ibuffer (DXScreenData &scrn, const GeomPrimitivePipelineReader *reader) |
Creates a new index buffer (but does not upload data to it). | |
virtual void | evict_lru () |
Evicts the page from the LRU. | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
bool | upload_data (const GeomPrimitivePipelineReader *reader, bool force) |
Copies the latest data from the client store to DirectX. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
Public Attributes | |
IDirect3DIndexBuffer8 * | _ibuffer |
Caches a GeomPrimitive in the DirectX device as an index buffer.
Definition at line 27 of file dxIndexBufferContext8.h.
void DXIndexBufferContext8::create_ibuffer | ( | DXScreenData & | scrn, |
const GeomPrimitivePipelineReader * | reader | ||
) |
Creates a new index buffer (but does not upload data to it).
Definition at line 94 of file dxIndexBufferContext8.cxx.
References GeomVertexArrayFormat::get_column(), IndexBufferContext::get_data(), GeomPrimitivePipelineReader::get_data_size_bytes(), DXGraphicsStateGuardian8::get_index_type(), and GeomVertexColumn::get_numeric_type().
Referenced by DXGraphicsStateGuardian8::apply_index_buffer().
void DXIndexBufferContext8::evict_lru | ( | ) | [virtual] |
Evicts the page from the LRU.
Called internally when the LRU determines that it is full. May also be called externally when necessary to explicitly evict the page.
It is legal for this method to either evict the page as requested, do nothing (in which case the eviction will be requested again at the next epoch), or requeue itself on the tail of the queue (in which case the eviction will be requested again much later).
Reimplemented from AdaptiveLruPage.
Definition at line 70 of file dxIndexBufferContext8.cxx.
References AdaptiveLruPage::dequeue_lru(), IndexBufferContext::mark_unloaded(), and IndexBufferContext::update_data_size_bytes().
static void DXIndexBufferContext8::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from IndexBufferContext.
Definition at line 44 of file dxIndexBufferContext8.h.
References IndexBufferContext::init_type().
bool DXIndexBufferContext8::upload_data | ( | const GeomPrimitivePipelineReader * | reader, |
bool | force | ||
) |
Copies the latest data from the client store to DirectX.
Definition at line 137 of file dxIndexBufferContext8.cxx.
References IndexBufferContext::get_data(), and GeomPrimitivePipelineReader::get_data_size_bytes().
Referenced by DXGraphicsStateGuardian8::apply_index_buffer().