loadShader()

Rendering / Shaders

Description

Loads a GLSL shader from a file. Pass the fragment shader path and optionally the vertex shader path.

Syntax

PShader* loadShader(std::string fragPath) PShader* loadShader(std::string fragPath, std::string vertPath)

Parameters

NameTypeDescription
fragPathstd::stringpath to fragment shader file
vertPathstd::stringpath to vertex shader file (optional)

Returns

PShader*

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...