adbrown85/glycerin — Issue #4: Add a shader loader
Author: adbrown85
Created: 2012-02-08 02:36:32+00:00
State: open

OpenGL considers shaders to be strings (it has no notion of files) so we need to write something to load them from files ourselves.

This will just be a utility with one or two static methods to load a shader from a file given a filename. Although it may be nice to have it optionally take a directory to look in since the filenames can get pretty long sometimes. Ideally it should be able to guess the type of the shader using the file extension. Also for now returning the handle as a `GLuint` is fine since a designated *Shader* or *ShaderKernel* class may be too much for our scope.

Here is a general prototype for the class:

> ShaderLoader
> + load(filename : string) : GLuint
> + load(filename : string, type : GLenum) : GLuint