~gimaker/peekabot/coord-sys-default

« back to all changes in this revision

Viewing changes to src/renderer/IndexBuffer.cc

  • Committer: Staffan Gimåker
  • Date: 2009-06-29 10:09:26 UTC
  • mfrom: (665.1.39 renderer-redux)
  • Revision ID: staffan@gimaker.se-20090629100926-ju5kx8jwzy422rwu
Merged the renderer-redux branch.

This represents a major overhaul to the rendering engine, with a less contrived
design and better performance. Both memory and CPU utilization should be 
better in general.

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
        }
127
127
 
128
128
        m_data = new uint8_t[n_bytes];
129
 
        memcpy(m_data, data, n_bytes);
 
129
        if( data )
 
130
            memcpy(m_data, data, n_bytes);
130
131
    }
131
132
}
132
 
        
133
 
        
 
133
 
 
134
 
134
135
void IndexBuffer::set_data(
135
136
    const void *data, size_t n_bytes, size_t offset)
136
137
    throw(std::runtime_error)