Example failure code:
Code: Select all
// CVertexBuffer and CIndexBuffer copy constructor test
#include <irrlicht.h>
int main()
{
irr::scene::CVertexBuffer cvb1(irr::video::EVT_STANDARD);
//irr::scene::CVertexBuffer cvb2(cvb1); //< shallow copy leads to seg fault on deletion!
irr::scene::CVertexBuffer cvb2(irr::video::EVT_STANDARD);
//cvb2 = cvb1; //< shallow copy
irr::scene::CIndexBuffer cib1(irr::video::EIT_16BIT);
//irr::scene::CIndexBuffer cib2(cib1); //< shallow copy
irr::scene::CIndexBuffer cib2(irr::video::EIT_16BIT);
//cib2 = cib1; //< shallow copy
return 0;
}