 }@@
 
 @@{
+rtcMapBuffer(EXPR scene,EXPR geomID,RTC_BUFFER(EXPR type, EXPR slot))
+=>
+rtcMapBuffer(rtcGetGeometry(scene,geomID),type,slot)
+}@@
+
+@@{
+rtcMapBuffer(EXPR scene,EXPR geomID,EXPR type)
+=>
+rtcMapBuffer(rtcGetGeometry(scene,geomID),type,/* FIXME: put proper slot here */)
+}@@
+
+@@{
 rtcUnmapBuffer(EXPR scene,EXPR geomID,EXPR type)
 =>
 rtcUnmapBuffer(rtcGetGeometry(scene,geomID),type)

=>
uniform RTCGeometry geom = rtcNewCurveGeometry (device,type,flags,numPrimitives,numVertices,numTimeSteps);
@@{
rtcMapBuffer(EXPR geom,RTC_INDEX_BUFFER)
=>
rtcNewBuffer(geom,RTC_INDEX_BUFFER,sizeof(uniform int),numPrimitives)
}@@
@@{
rtcSetBuffer(EXPR geom,RTC_INDEX_BUFFER,EXPR ptr,EXPR offset,EXPR stride)
=>
rtcSetBuffer(geom,RTC_INDEX_BUFFER,ptr,offset,stride,numPrimitives)
}@@
@@{
rtcMapBuffer(EXPR geom,REGEXPR(vertex_buffer,RTC_VERTEX_BUFFER.*))
=>
rtcNewBuffer(geom,vertex_buffer,4*sizeof(uniform float),numVertices)
}@@
@@{
rtcSetBuffer(EXPR geom,REGEXPR(vertex_buffer,RTC_VERTEX_BUFFER.*),EXPR ptr,EXPR offset,EXPR stride)
=>
rtcSetBuffer(geom,vertex_buffer,ptr,offset,stride,numVertices)
}@@
@@{
rtcSetBuffer(EXPR geom,REGEXPR(user_vertex_buffer,RTC_USER_VERTEX_BUFFER.*),EXPR ptr,EXPR offset,EXPR stride)
=>
rtcSetBuffer(geom,user_vertex_buffer,ptr,offset,stride,numVertices)
}@@
}@@

@@{
rtcSetBuffer(EXPR geom,EXPR type,EXPR ptr,EXPR offset,EXPR stride)
=>
rtcSetBuffer(geom,type,ptr,offset,stride,/* put buffer size here */)
}@@

@@{

}@@

@@{
rtcMapBuffer(EXPR geom,EXPR type,EXPR slot)
=>
rtcGetGeometryBufferData(geom,type,slot) /* FIXME: check if this should be rtcNewBuffer */
}@@


@@{
rtcSetIndexBuffer(EXPR geom, RTC_BUFFER(RTC_BUFFER_TYPE_VERTEX_ATTRIBUTE,EXPR vertexSlot) , RTC_BUFFER(RTC_BUFFER_TYPE_INDEX,EXPR indexSlot));
=>
rtcSetGeometryVertexAttributeTopology(geom, vertexSlot, indexSlot);
}@@
