File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,22 @@ extern Shader *lookupshaderbyname(std::string_view name);
6363 * @return pointer to a Shader object corresponding to the name passed
6464 */
6565extern Shader *useshaderbyname (std::string_view name);
66+
67+ /* *
68+ * @brief Creates a shader and adds it to the shaders map, if one with this key does not exist.
69+ *
70+ * If there is already a shader in the shaders map with the key associated with `name`,
71+ * returns a pointer to that shader and does not construct a new one.
72+ *
73+ * If no such shader exists in `shaders`, creates a new shader by executing in
74+ * Cubescript the passed chain of variadic arguments. The expected format is similar
75+ * to that of printf, with the first parameter being the string and following parameters
76+ * being values inserted into format specifiers (e.g. %f or %d).
77+ *
78+ * @param name the key to associate with the shader object
79+ * @param cmd the command to execute
80+ * @param ... values to insert into format specifiers in cmd
81+ */
6682extern Shader *generateshader (std::string_view name, const char *cmd, ...);
6783
6884/* *
You can’t perform that action at this time.
0 commit comments