22#define DEBUG_VERTEX_BUFFER false
24TypeHandle DXVertexBufferContext9::_type_handle;
29DXVertexBufferContext9::
46 if (n < num_columns &&
47 array_format->
get_column(n)->get_name() == InternalName::get_vertex()) {
48 Geom::Contents contents = array_format->get_column(n)->get_contents();
51 int num_blend_values = 0;
53 if (n < num_columns &&
54 array_format->get_column(n)->get_name() == InternalName::get_transform_weight()) {
56 num_blend_values = array_format->get_column(n)->get_num_values();
60 if (n < num_columns &&
61 array_format->
get_column(n)->get_name() == InternalName::get_transform_index()) {
63 _fvf |= D3DFVF_LASTBETA_UBYTE4;
68 switch (num_blend_values) {
95 if (n < num_columns &&
96 array_format->
get_column(n)->get_name() == InternalName::get_normal()) {
97 _fvf |= D3DFVF_NORMAL;
100 if (n < num_columns &&
101 array_format->
get_column(n)->get_name() == InternalName::get_color()) {
102 _fvf |= D3DFVF_DIFFUSE;
108 int texcoord_index = 0;
109 while (n < num_columns &&
110 array_format->
get_column(n)->get_contents() == Geom::C_texcoord) {
111 const GeomVertexColumn *column = array_format->get_column(n);
112 switch (column->get_num_values()) {
114 _fvf |= D3DFVF_TEXCOORDSIZE1(texcoord_index);
118 _fvf |= D3DFVF_TEXCOORDSIZE2(texcoord_index);
122 _fvf |= D3DFVF_TEXCOORDSIZE3(texcoord_index);
126 _fvf |= D3DFVF_TEXCOORDSIZE4(texcoord_index);
133 switch (texcoord_index) {
177 if ( _vbuffer !=
nullptr ) {
void dequeue_lru()
Removes the page from its AdaptiveLru.
A GraphicsStateGuardian for rendering into DirectX9 contexts.
virtual void evict_lru()
Evicts the page from the LRU.
This is the data for one array of a GeomVertexData structure.
A table of objects that are saved within the graphics context for reference by handle later.
TypeHandle is the identifier used to differentiate C++ class types.
This is a special class object that holds all the information returned by a particular GSG to indicat...
void update_data_size_bytes(size_t new_data_size_bytes)
Should be called (usually by a derived class) when the on-card size of this object has changed.
void mark_unloaded()
Should be called after the buffer has been forced out of graphics memory.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.