![]() |
CMSC23700 Common Code Library
Support code for CS23700 programming projects
|
#include <cs237-shader.hxx>
Inherits cs237::__detail::Shader.
Public Member Functions | |
FragmentShader (const char *file) | |
load a fragment shader from a file. More... | |
FragmentShader (const char **prog) | |
define a shader from an array of strings More... | |
![]() | |
GLuint | Id () const |
Additional Inherited Members | |
![]() | |
Shader (GLenum kind) | |
bool | LoadFromFile (const char *file) |
bool | LoadFromString (const char **prog) |
cs237::FragmentShader::FragmentShader | ( | const char * | file | ) |
load a fragment shader from a file.
file | the name of the shader source file |
This function loads and compiles a fragment shader from a file. If there is an error, it will print information to stderr and return 0.
cs237::FragmentShader::FragmentShader | ( | const char ** | prog | ) |
define a shader from an array of strings
prog | the shader source code represented as an array of char pointers. The last element of the array should be nullptr. |
This function loads and compiles a fragment shader from a file. If there is an error, it will print information to stderr and return 0.