Hello all,
After pushing the geometries into primitives, where is the function call to start render the primitives?
Thanks,
Steven
Hello all,
After pushing the geometries into primitives, where is the function call to start render the primitives?
Thanks,
Steven
Hi Steven,
Have you added the primitives to the list of primitives for rendering?
var primitive = new Primitive(/* … */);
scene.getPrimitives().add(primitive);
Also are you using the Cesium viewer? or are you planning on creating a custom render loop?
Regards,
Dan
Hi Dan,
Thanks for the reply.
Yes, I did, and the code I wrote worked just fine. I am using cesiumwidget instead of viewer.
I want to study how are the primitives are rendered in Cesium, but I couldn’t find the actually function call to draw these primitives on the globe. Would you please point me the place where the rendering process started?
Thanks,
Steven
在 2014年2月18日星期二UTC-8下午2时55分07秒,Daniel Bagnell写道:
The core rendering logic is in Scene.js. The functions you should look at are initializeFrame, which only updates animations and the camera, and render, which updates the primitives, finds potentially visible primitives, updates the frustums and finally draws them. I would suggest opening the developer tools in Chrome or Firefox, setting a breakpoint on line 926 of Scene.js and stepping through updatePrimitives, createPotentiallyVisibleSet and executeCommands.