Changeset 323 for trunk/src/gfx/mesh_creator.cc
- Timestamp:
- 08/26/14 04:03:10 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gfx/mesh_creator.cc
r302 r323 128 128 const vertex_descriptor& desc = channel->desc; 129 129 uint8* raw_data = channel->data; 130 intvtx_size = desc.size;130 uint32 vtx_size = desc.size; 131 131 int p_offset = -1; 132 132 int n_offset = -1; … … 135 135 switch ( desc.slots[i].vslot ) 136 136 { 137 case slot::POSITION : if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) p_offset = desc.slots[i].offset; break;138 case slot::NORMAL : if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) n_offset = desc.slots[i].offset; break;139 case slot::TANGENT : if ( desc.slots[i].etype == FLOAT_VECTOR_4 ) t_offset = desc.slots[i].offset; break;137 case slot::POSITION : if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) p_offset = (int)desc.slots[i].offset; break; 138 case slot::NORMAL : if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) n_offset = (int)desc.slots[i].offset; break; 139 case slot::TANGENT : if ( desc.slots[i].etype == FLOAT_VECTOR_4 ) t_offset = (int)desc.slots[i].offset; break; 140 140 default : break; 141 141 } … … 173 173 size_t n_offset = 0; 174 174 if ( ch_n == -1 ) return; 175 mesh_raw_channel* channel = m_data->m_channels[ ch_n];175 mesh_raw_channel* channel = m_data->m_channels[ (unsigned) ch_n ]; 176 176 for ( uint32 i = 0; i < channel->desc.count; ++i ) 177 177 if ( channel->desc.slots[i].vslot == slot::NORMAL ) … … 211 211 if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) 212 212 { 213 p_offset = desc.slots[i].offset;213 p_offset = (int)desc.slots[i].offset; 214 214 p_channel = channel; 215 215 } … … 217 217 case slot::NORMAL : if ( desc.slots[i].etype == FLOAT_VECTOR_3 ) 218 218 { 219 n_offset = desc.slots[i].offset;219 n_offset = (int)desc.slots[i].offset; 220 220 n_channel = m_data->m_channels[ c ]; 221 221 n_channel_index = c; … … 224 224 case slot::TEXCOORD : if ( desc.slots[i].etype == FLOAT_VECTOR_2 ) 225 225 { 226 t_offset = desc.slots[i].offset;226 t_offset = (int)desc.slots[i].offset; 227 227 t_channel = channel; 228 228 } … … 420 420 int och_ti = other->get_channel_index( slot::TEXCOORD ); 421 421 if ( ch_pi == -1 || ch_ti == -1 ) return; 422 size_t size = m_data->m_channels[ ch_ti ]->count;423 size_t osize = other->m_channels[ och_ti ]->count;424 size_t count = m_data->m_channels[ ch_pi ]->count;425 size_t ocount = other->m_channels[ och_pi ]->count;422 size_t size = m_data->m_channels[ (unsigned)ch_ti ]->count; 423 size_t osize = other->m_channels[ (unsigned)och_ti ]->count; 424 size_t count = m_data->m_channels[ (unsigned)ch_pi ]->count; 425 size_t ocount = other->m_channels[ (unsigned)och_pi ]->count; 426 426 if ( count % size != 0 || ocount % osize != 0 ) return; 427 427 if ( count / size != ocount / osize ) return;
Note: See TracChangeset
for help on using the changeset viewer.