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