Better abstraction for shader programs
This commit is contained in:
parent
4ff19bffa6
commit
7d16b704b5
5 changed files with 115 additions and 37 deletions
29
utilities.hh
29
utilities.hh
|
@ -126,6 +126,35 @@ struct T_ShaderCode
|
|||
std::vector< char* > code;
|
||||
};
|
||||
|
||||
struct T_ShaderProgram
|
||||
{
|
||||
T_ShaderProgram( ) = delete;
|
||||
T_ShaderProgram( T_ShaderProgram const& ) = delete;
|
||||
T_ShaderProgram( T_ShaderProgram&& ) = delete;
|
||||
|
||||
T_ShaderProgram(
|
||||
__rd__ GLenum programType ,
|
||||
__rw__ T_FilesWatcher& watcher );
|
||||
~T_ShaderProgram( );
|
||||
|
||||
void addChunk( __rd__ std::string const& string );
|
||||
void addFile( __rd__ std::string const& source );
|
||||
|
||||
void load( );
|
||||
bool activate( ) const;
|
||||
|
||||
private:
|
||||
T_WatchedFiles files_;
|
||||
|
||||
std::vector< bool > chunksOrFiles_;
|
||||
std::vector< std::string > parts_;
|
||||
|
||||
std::vector< std::string > errors_;
|
||||
|
||||
GLenum programType_;
|
||||
GLuint program_;
|
||||
};
|
||||
|
||||
|
||||
/*= T_Camera =================================================================*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue