Skip to content

PEN_2_3

Francisco Zavala edited this page Sep 7, 2024 · 5 revisions

Function to print the shader compilation log:

void printShaderLog(GLuint shader); This function prints the compilation log of a shader in OpenGL, which is useful for debugging issues during shader compilation.

  • Parameters:

  • shader: Is the identifier of the shader to be checked.

Function to print the program compilation log:

void printProgramLog(int prog); This function prints the compilation log of a program in OpenGL, which is useful for debugging issues during program linking.

  • Parameters:

  • prog: Is the identifier of the program to be checked.

Function to check for OpenGL errors:

bool checkOpenGLError(); This function checks if any errors have occurred in OpenGL operations, printing all errors found. It is useful for general debugging of OpenGL code.

  • Return:

bool: Returns true if at least one error was found, otherwise, returns false.

program_2_6

Clone this wiki locally