Skip to content

Mesh functions

ScriptCodex13 edited this page Oct 26, 2025 · 2 revisions

Mesh functions

Here's a list of all the functions from the zap::Mesh class avaiable for the user.


SetVertexShaderSource   (const std::string& source)

Provides the vertex shader source for the mesh. (only usable before .Finish())


SetFragmentShaderSource   (const std::string& source)

Provides the fragment shader source for the mesh. (only usable before .Finish())

You can also provide shaders from a file:

SetVertexShaderFilePath   (const std::string& vertexShaderFilepath); // 1
SetVertexShaderPath       (const std::string& vertexShaderFilepath); // 2 | difference !

SetFragmentShaderFilePath (const std::string& fragmentShaderFilepath); // 1
SetFragmentShaderPath     (const std::string& fragmentShaderFilepath); // 2 | difference !

There are two functions which do the same but behave a little bit different: the functions with the 1 will throw an assert if the provided file path doesn't exist and throw an error message. The second will (if the path is not valid) just use the default one and print an error message to the console.

Clone this wiki locally