Ignore:
Timestamp:
Feb 19, 2011, 10:09:20 PM (11 years ago)
Author:
sam
Message:

Protect the Shader constructor and provide a static creation method that
will let us cache shaders.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shader.h

    r659 r668  
    1111//
    1212// The Shader class
    13 // --------------
     13// ----------------
    1414//
    1515
     
    2222{
    2323public:
    24     Shader(char const *vert, char const *frag);
    25     ~Shader();
     24    static Shader *Create(char const *vert, char const *frag);
     25    static void Destroy(Shader *shader);
    2626
    2727    int GetAttribLocation(char const *attr) const;
     
    2929
    3030    void Bind() const;
     31
     32protected:
     33    Shader(char const *vert, char const *frag);
     34    ~Shader();
    3135
    3236private:
Note: See TracChangeset for help on using the changeset viewer.