Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes

DXIndexBufferContext8 Class Reference

Caches a GeomPrimitive in the DirectX device as an index buffer. More...

#include "dxIndexBufferContext8.h"

Inheritance diagram for DXIndexBufferContext8:
IndexBufferContext BufferContext AdaptiveLruPage SavedContext LinkedListNode AdaptiveLruPageDynamicList AdaptiveLruPageStaticList TypedObject LinkedListNode LinkedListNode MemoryBase

List of all members.

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

Detailed Description

Caches a GeomPrimitive in the DirectX device as an index buffer.

Definition at line 27 of file dxIndexBufferContext8.h.


Member Function Documentation

void DXIndexBufferContext8::create_ibuffer ( DXScreenData scrn,
const GeomPrimitivePipelineReader reader 
)
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().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations