Hi everyone,
1. A concise explanation of the problem you’re experiencing.
I create a custom edge primitive and use drawCommand to render in the scene. But when I tilt the camera near the terrain surface, the edge primitive disappeared.
P.S. Other primitive I created before has the same problem.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
This is how I create the drawCommand.
//creating buffers
…
//creating renderState
EdgeLoader.object.rs = RenderState.fromCache({
depthTest : {
enabled : true
},
depthMask : true,
blending : BlendingState.DISABLED
}
);
//do other thing
…
//creating drawcommand
EdgeLoader.object.drawCommand = new DrawCommand({
cull : false,
modelMatrix : modelMatrix,
primitiveType : PrimitiveType.LINES,
boundingVolume : bs,
vertexArray : EdgeLoader.object.va,
shaderProgram : EdgeLoader.object.shaderProgram,
uniformMap : uniformMap,
renderState : EdgeLoader.object.rs,
pass : Pass.OPAQUE,
pickId :pickId
});
``
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to draw edges of a model.
4. The Cesium version you’re using, your operating system and browser.
Cesium 1.54
Win 10
Chrome 72.0.3626.119
Any help appreciated.
Chris