 }@@
 
 @@{
-rtcNewQuadMesh2(EXPR scene,EXPR flags,EXPR numQuads,EXPR numVertices)
-=>
-rtcNewQuadMesh2(scene,flags,numQuads,numVertices,1)
-}@@
-
-@@{
-ID geomID = rtcNewQuadMesh2(EXPR scene,EXPR flags,EXPR numQuads,EXPR numVertices,EXPR numTimeSteps);
-=>
-RTCGeometry geom = rtcNewQuadMesh (g_device,flags,numQuads,numVertices,numTimeSteps);
+rtcNewQuadMesh2(EXPR scene,EXPR flags,EXPR numPrimitives,EXPR numVertices)
+=>
+rtcNewQuadMesh2(scene,flags,numPrimitives,numVertices,1)
+}@@
+
+@@{
+ID geomID = rtcNewQuadMesh2(EXPR scene,EXPR flags,EXPR numPrimitives,EXPR numVertices,EXPR numTimeSteps);
+=>
+RTCGeometry geom = rtcNewQuadMesh (g_device,flags,numPrimitives,numVertices,numTimeSteps);
 geomID = rtcAttachGeometry(scene,geom);
 rtcReleaseGeometry(geom);
 }@@
 
 @@{
-rtcNewQuadMesh2(EXPR scene,EXPR flags,EXPR numQuads,EXPR numVertices,EXPR numTimeSteps,EXPR geomID);
-=>
-RTCGeometry geom = rtcNewQuadMesh (g_device,flags,numQuads,numVertices,numTimeSteps);
+rtcNewQuadMesh2(EXPR scene,EXPR flags,EXPR numPrimitives,EXPR numVertices,EXPR numTimeSteps,EXPR geomID);
+=>
+RTCGeometry geom = rtcNewQuadMesh (g_device,flags,numPrimitives,numVertices,numTimeSteps);
 rtcAttachGeometryById(scene,geom,geomID);
 rtcReleaseGeometry(geom);
 }@@
 
 @@{
-RTCGeometry ID geom = rtcNewQuadMesh (EXPR device,EXPR flags,EXPR numQuads,EXPR numVertices,EXPR numTimeSteps);
-=>
-RTCGeometry geom = rtcNewQuadMesh (device,flags,numQuads,numVertices,numTimeSteps);
+RTCGeometry ID geom = rtcNewQuadMesh (EXPR device,EXPR flags,EXPR numPrimitives,EXPR numVertices,EXPR numTimeSteps);
+=>
+RTCGeometry geom = rtcNewQuadMesh (device,flags,numPrimitives,numVertices,numTimeSteps);
 rtcSetGeometryBuildQuality(geom,flags);
 rtcSetNumTimeSteps(geom,numTimeSteps);
 }@@

}@@

@@{
rtcNewTriangleMesh2(EXPR scene,EXPR flags,EXPR numTriangles,EXPR numVertices)
=>
rtcNewTriangleMesh2(scene,flags,numTriangles,numVertices,1)
}@@

@@{
ID geomID = rtcNewTriangleMesh2 (EXPR scene,EXPR flags,EXPR numTriangles,EXPR numVertices,EXPR numTimeSteps);
=>
RTCGeometry geom = rtcNewTriangleMesh (g_device,flags,numTriangles,numVertices,numTimeSteps);
geomID = rtcAttachGeometry(scene,geom);
rtcReleaseGeometry(geom);
}@@

@@{
rtcNewTriangleMesh2 (EXPR scene,EXPR flags,EXPR numTriangles,EXPR numVertices,EXPR numTimeSteps,EXPR geomID);
=>
RTCGeometry geom = rtcNewTriangleMesh (g_device,flags,numTriangles,numVertices,numTimeSteps);
rtcAttachGeometryById(scene,geom,geomID);
rtcReleaseGeometry(geom);
}@@

@@{
RTCGeometry ID geom = rtcNewTriangleMesh (EXPR device,EXPR flags,EXPR numTriangles,EXPR numVertices,EXPR numTimeSteps);
=>
RTCGeometry geom = rtcNewTriangleMesh (device,flags,numTriangles,numVertices,numTimeSteps);
rtcSetGeometryBuildQuality(geom,flags);
rtcSetNumTimeSteps(geom,numTimeSteps);
}@@



@@{
rtcNewTriangleMesh (EXPR device,EXPR flags,EXPR numPrimitives,EXPR numVertices,EXPR numTimeSteps)
=>
rtcNewTriangleMesh (device)
}@@

@@{
rtcNewQuadMesh (EXPR device,EXPR flags,EXPR numPrimitives,EXPR numVertices,EXPR numTimeSteps)
=>
rtcNewQuadMesh (device)
}@@

@@{
rtcNewSubdivisionMesh (EXPR device,EXPR flags,EXPR numPrimitives,EXPR numEdges,EXPR numVertices,EXPR numEdgeCreases,EXPR numVertexCreases,EXPR numHoles)
=>
rtcNewSubdivisionMesh (device)
}@@

@@{
rtcNewCurveGeometry (EXPR device,EXPR basis,EXPR intersector,EXPR flags,EXPR numPrimitives,EXPR numVertices,EXPR numTimeSteps)
=>
rtcNewCurveGeometry (device,basis)
}@@
