Hey,
I’m trying to use Cesium’s rendering stack to render custom primitives.
See : https://codepaste.net/3fahb3
I have a series of Cartesian-coordinates to use as data for the mesh.
Along with that I also have a series of indices that must be connected to triangulate the mesh.
I have created a new primitive that implements an update method.
The sequence f actions I am following is.
createBuffers -
-
Create Vertex buffers for the data.
-
Create an index buffer to render the points as a series of triangles.
-
Create a vertex array baed on the bound buffers.
createShaderProgram - -
Create shader sources based on vertex and fragment shader texts.
-
Create shader program from the sources.
createDrawCommad - -
Create a new draw command and set the vertex array and shader program props.
-
Add the draw command to the frame states command list.
When I add this primitive to the scene I get an error saying Fragment shader failed to compile.: " ‘v’ syntax error " on line 0.
The frament shader is very basic as follows.
######### meshFSShader.glsl ###########
void main() {
gl_FragColor = vec4(1.0,0.0,1.0,1.0);
}
It seems to be throwing a compilation error for the ‘v’ in void main.
Could anyone point out what I’m doing wrong.
Regards,
Sushrut Shivaswamy