Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Functions
Shader Validation

Validate shaders compilation on the GPU and output IDE-compliant error messages.

Functions

bool processLog (const std::string &compilationLog, const std::vector< std::string > &filePaths)
 
int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Perform shader validation: load all shaders in the resources directory, compile them on the GPU and output error logs.

Parameters
argcthe number of input arguments.
argva pointer to the raw input arguments.
Returns
a boolean denoting if at least one shader failed to compile.

◆ processLog()

bool processLog ( const std::string &  compilationLog,
const std::vector< std::string > &  filePaths 
)

Convert a shader compilation log into a IDE-compatible error reporting format and output it to stderr.

Parameters
compilationLogthe compilation log to process.
filePathsthe paths to the shader file and all include files, absolute or relative to the directory containing the IDE project.
Returns
a boolean denoting if at least one error was reported by the log.
Warning
If filePath is not expressed absolute or relative to the directory containing the IDE project, error links (for instance "src/foo/bar.frag:18") won't be functional.