/* ZShaderProgramBase.hpp Author: Chris Ertel , James Russell Created: 04/03/2011 Purpose: ZShaderProgramBase handles the simple logistics for shader programs (e.g., log access, check usability). It is intended to be extended by subclasses to handle implementation-specific issues. License: TODO */ #pragma once #ifndef _ZSHADERPROGRAMBASE_HPP #define _ZSHADERPROGRAMBASE_HPP #include #include class ZShaderProgramBase : public ZShaderProgram { protected: //Default Constructor ZShaderProgramBase(); //Our attached shaders (currently only support vertex and fragment) ZPtr VertexShader; ZPtr FragmentShader; ZArray< ZPtr > Shaders; //Our cached set of uniform blocks, samplers, and vertex streams ZArray UniformBlocks; ZArray Samplers; ZArray Streams; //Link log for shader program ZString Log; //Flag for shader in usable state bool bIsUsable; public: //Virtual destructor virtual ~ZShaderProgramBase(); //Subclass Implementation virtual bool AttachShader(ZPtr _shader); //Subclass Implementation virtual void ClearLog(); //Subclass Implementation virtual void DetachShaders(); //Subclass Implementation virtual const ZString& GetLinkLog(); //Subclass Implementation virtual const ZArray& GetStreamDeclarations(); //Subclass Implementation virtual const ZArray& GetUniformBlockDeclarations(); //Subclass Implementation virtual const ZArray& GetShaderSamplerDeclarations(); //Subclass Implementation virtual const ZArray< ZPtr >& GetShaders(); //Subclass Implementation virtual bool IsUsable(); //Not Implemented virtual bool Link() = 0; }; #endif