<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">
I've tried to create a super basic subd mesh with this code</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">
<div><br>
</div>
<div><span style="white-space:pre"></span>mesh->subdivision_type = ccl::Mesh::SUBDIVISION_LINEAR;</div>
<div><span style="white-space:pre"></span>int numVertex = 3000;</div>
<div><span style="white-space:pre"></span>mesh->verts.resize(numVertex);</div>
<div><span style="white-space:pre"></span>printf("resized %i\n", numVertex);</div>
<div><span style="white-space:pre"></span>for(int i=0;i<numVertex;i++)</div>
<div><span style="white-space:pre"></span>mesh->verts[i] = ccl::make_float3(0, 0, 0);</div>
<div></div>
<div><br>
</div>
<div><span style="font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; font-size: 16px; font-family: Calibri, Helvetica, sans-serif; color: rgb(0, 0, 0); white-space: pre;"></span>int indices[3];</div>
<div><span style="white-space:pre"></span>indices[0] = 0;</div>
<div><span style="white-space:pre"></span>indices[1] = 1;</div>
<div><span style="white-space:pre"></span>indices[2] = 2;</div>
<div><span style="white-space:pre"></span>mesh->reserve_subd_faces(1, 0, 3);</div>
<div><span style="white-space:pre"></span>mesh->add_subd_face(indices, 3, 0, false);</div>
<div><br>
</div>
<div><span style="white-space:pre"></span>if (!mesh->subd_params) {</div>
<div><span style="white-space:pre"></span>mesh->subd_params = new ccl::SubdParams(mesh);</div>
<div><span style="white-space:pre"></span>}</div>
<div><span style="white-space:pre"></span>ccl::SubdParams& sdparams = *mesh->subd_params;</div>
<div><span style="white-space:pre"></span>sdparams.camera = scene->camera;
<div><br>
</div>
<div><span style="white-space:pre"></span>ccl::Object *object = new ccl::Object();</div>
<div><span style="white-space:pre"></span>object->mesh = mesh;</div>
<div><span style="white-space:pre"></span>scene->objects.push_back(object);</div>
<div><br>
</div>
<div>And yes... it only should generate one triangle, btw it shouldn't be rendered since all the vertex are in the same place (0,0,0) but that is not the question<br>
<br>
If I change <span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400;">numVertex  from 3000 to 300 it doesn't crash so it
 is related to the amount of vertex but anyway 3k is a pretty low amount.</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400;"><br>
</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400;">Any idea on this?</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400;"><br>
</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400;">Regards, F.</span></div>
</div>
<br>
</div>
</body>
</html>