X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fvertexsetup.cpp;h=86c9f0f237f5cbc9c178da7ebcf082a99454fc9c;hp=f077ad2e00260ac675efcd191a214b8820eb3554;hb=73567be7cd9e01e620cb2a8fa0ca381723b9a71f;hpb=6955c16bb123f3b795186c99442dc4d92be0ebc9 diff --git a/source/core/vertexsetup.cpp b/source/core/vertexsetup.cpp index f077ad2e..86c9f0f2 100644 --- a/source/core/vertexsetup.cpp +++ b/source/core/vertexsetup.cpp @@ -23,7 +23,8 @@ VertexSetup::VertexSetup(): dirty(0), vertex_array(0), inst_array(0), - index_buffer(0) + index_buffer(0), + index_type(UNSIGNED_SHORT) { static Require req(ARB_vertex_array_object); if(ARB_direct_state_access) @@ -86,9 +87,10 @@ void VertexSetup::set_instance_array(const VertexArray &a) dirty |= INSTANCE_ARRAY; } -void VertexSetup::set_index_buffer(const Buffer &ibuf) +void VertexSetup::set_index_buffer(const Buffer &ibuf, DataType itype) { index_buffer = &ibuf; + index_type = itype; dirty |= INDEX_BUFFER; }