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

DXVertexBufferContext8 Class Reference

Caches a GeomVertexArrayData in the DirectX device as a vertex buffer. More...

#include "dxVertexBufferContext8.h"

Inheritance diagram for DXVertexBufferContext8:
VertexBufferContext BufferContext AdaptiveLruPage SavedContext LinkedListNode AdaptiveLruPageDynamicList AdaptiveLruPageStaticList TypedObject LinkedListNode LinkedListNode MemoryBase

List of all members.

Public Member Functions

 DXVertexBufferContext8 (PreparedGraphicsObjects *pgo, GeomVertexArrayData *data)
void create_vbuffer (DXScreenData &scrn, const GeomVertexArrayDataHandle *reader)
 Creates a new vertex 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 GeomVertexArrayDataHandle *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

int _fvf
IDirect3DVertexBuffer8 * _vbuffer

Detailed Description

Caches a GeomVertexArrayData in the DirectX device as a vertex buffer.

Definition at line 27 of file dxVertexBufferContext8.h.


Member Function Documentation

void DXVertexBufferContext8::create_vbuffer ( DXScreenData scrn,
const GeomVertexArrayDataHandle reader 
)

Creates a new vertex buffer (but does not upload data to it).

Definition at line 220 of file dxVertexBufferContext8.cxx.

References VertexBufferContext::get_data().

Referenced by DXGraphicsStateGuardian8::apply_vertex_buffer().

void DXVertexBufferContext8::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 196 of file dxVertexBufferContext8.cxx.

References AdaptiveLruPage::dequeue_lru(), VertexBufferContext::mark_unloaded(), and VertexBufferContext::update_data_size_bytes().

static void DXVertexBufferContext8::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 VertexBufferContext.

Definition at line 45 of file dxVertexBufferContext8.h.

References VertexBufferContext::init_type().

bool DXVertexBufferContext8::upload_data ( const GeomVertexArrayDataHandle reader,
bool  force 
)

Copies the latest data from the client store to DirectX.

Definition at line 264 of file dxVertexBufferContext8.cxx.

References VertexBufferContext::get_data(), and GeomVertexArrayDataHandle::get_read_pointer().

Referenced by DXGraphicsStateGuardian8::apply_vertex_buffer().


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