15 #include "dxVertexBufferContext9.h" 16 #include "geomVertexArrayData.h" 17 #include "geomVertexArrayFormat.h" 18 #include "graphicsStateGuardian.h" 19 #include "pStatTimer.h" 20 #include "internalName.h" 21 #include "config_dxgsg9.h" 23 #define DEBUG_VERTEX_BUFFER false 25 TypeHandle DXVertexBufferContext9::_type_handle;
40 const GeomVertexArrayFormat *array_format = data->get_array_format();
45 int num_columns = array_format->get_num_columns();
49 if (n < num_columns &&
50 array_format->get_column(n)->get_name() == InternalName::get_vertex()) {
51 Geom::Contents contents = array_format->get_column(n)->get_contents();
54 int num_blend_values = 0;
56 if (n < num_columns &&
57 array_format->get_column(n)->get_name() == InternalName::get_transform_weight()) {
59 num_blend_values = array_format->get_column(n)->get_num_values();
63 if (n < num_columns &&
64 array_format->get_column(n)->get_name() == InternalName::get_transform_index()) {
66 _fvf |= D3DFVF_LASTBETA_UBYTE4;
71 switch (num_blend_values) {
98 if (n < num_columns &&
99 array_format->get_column(n)->get_name() == InternalName::get_normal()) {
100 _fvf |= D3DFVF_NORMAL;
103 if (n < num_columns &&
104 array_format->get_column(n)->get_name() == InternalName::get_color()) {
105 _fvf |= D3DFVF_DIFFUSE;
111 int texcoord_index = 0;
112 while (n < num_columns &&
113 array_format->get_column(n)->get_contents() == Geom::C_texcoord) {
117 _fvf |= D3DFVF_TEXCOORDSIZE1(texcoord_index);
121 _fvf |= D3DFVF_TEXCOORDSIZE2(texcoord_index);
125 _fvf |= D3DFVF_TEXCOORDSIZE3(texcoord_index);
129 _fvf |= D3DFVF_TEXCOORDSIZE4(texcoord_index);
136 switch (texcoord_index) {
185 if ( _vbuffer != NULL ) {
190 update_data_size_bytes(0);
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...
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...
Encapsulates all the communication with a particular instance of a given rendering backend...
TypeHandle is the identifier used to differentiate C++ class types.
This is the data for one array of a GeomVertexData structure.