22 #define DEBUG_VERTEX_BUFFER false 24 TypeHandle DXVertexBufferContext9::_type_handle;
29 DXVertexBufferContext9::
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) {
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 ) {
A GraphicsStateGuardian for rendering into DirectX9 contexts.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void mark_unloaded()
Should be called after the buffer has been forced out of graphics memory.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A table of objects that are saved within the graphics context for reference by handle later.
This defines how a single column is interleaved within a vertex array stored within a Geom.
void dequeue_lru()
Removes the page from its AdaptiveLru.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_num_values() const
Returns the number of numeric values of the column: the number of distinct numeric values that go int...
This is a special class object that holds all the information returned by a particular GSG to indicat...
virtual void evict_lru()
Evicts the page from the LRU.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the data for one array of a GeomVertexData structure.