Files
libsst/Include/ZRenderer/ZShaderBase.hpp
2026-04-03 00:22:39 -05:00

75 lines
1.2 KiB
C++

/*
ZShaderBase.hpp
Author: Chris Ertel <crertel@762studios.com>,
James Russell <jcrussell@762studios.com>
Created: 4/20/2011
Purpose:
Base implementation of the ZShader interface.
License:
TODO
*/
#pragma once
#ifndef _ZSHADERBASE_HPP
#define _ZSHADERBASE_HPP
#include <ZRenderer/ZShader.hpp>
/*
Shader base class implementation.
*/
class ZShaderBase : public ZShader
{
protected:
//The type of shader
ZShaderType Type;
//The shader source
ZString Source;
//The shader compilation log
ZString Log;
//Boolean set to true indicates this is a usable shader
bool bIsUsable;
public:
/*
Constructor.
@param _type - the type of shader this is
*/
ZShaderBase(ZShaderType _type);
//Virtual Destructor
virtual ~ZShaderBase();
//Subclass Implementation
virtual void ClearCompileLog();
//Subclass Implementation
virtual const ZString& GetCompileLog();
//Subclass Implementation
virtual const ZString& GetSource();
//Subclass Implementation
virtual ZShaderType GetType();
//Subclass Implementation
virtual bool IsUsable();
//Subclass Implementation
virtual void SetSource( const ZString& _source );
//Not Implemented
virtual bool Compile() = 0;
};
#endif