Ignore:
Timestamp:
08/26/14 04:03:10 (11 years ago)
Author:
epyon
Message:
  • nova now compiles again under all three compilers with -Winsane and no warnings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gfx/mesh_creator.cc

    r302 r323  
    128128                const vertex_descriptor& desc   = channel->desc;
    129129                uint8* raw_data = channel->data;
    130                 int vtx_size = desc.size;
     130                uint32 vtx_size = desc.size;
    131131                int p_offset = -1;
    132132                int n_offset = -1;
     
    135135                        switch ( desc.slots[i].vslot )
    136136                        {
    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;
    140140                                default             : break;
    141141                        }
     
    173173        size_t n_offset = 0;
    174174        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 ];
    176176        for ( uint32 i = 0; i < channel->desc.count; ++i )
    177177                if ( channel->desc.slots[i].vslot == slot::NORMAL )
     
    211211                                if ( desc.slots[i].etype == FLOAT_VECTOR_3 )
    212212                                {
    213                                         p_offset  = desc.slots[i].offset;
     213                                        p_offset  = (int)desc.slots[i].offset;
    214214                                        p_channel = channel;
    215215                                }
     
    217217                        case slot::NORMAL   : if ( desc.slots[i].etype == FLOAT_VECTOR_3 )
    218218                                {
    219                                         n_offset  = desc.slots[i].offset;
     219                                        n_offset  = (int)desc.slots[i].offset;
    220220                                        n_channel = m_data->m_channels[ c ];
    221221                                        n_channel_index = c;
     
    224224                        case slot::TEXCOORD : if ( desc.slots[i].etype == FLOAT_VECTOR_2 )
    225225                                {
    226                                         t_offset  = desc.slots[i].offset;
     226                                        t_offset  = (int)desc.slots[i].offset;
    227227                                        t_channel = channel;
    228228                                }
     
    420420        int och_ti = other->get_channel_index( slot::TEXCOORD );
    421421        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;
    426426        if ( count % size != 0 || ocount % osize != 0 ) return;
    427427        if ( count / size != ocount / osize ) return;
Note: See TracChangeset for help on using the changeset viewer.