Initial commit
This commit is contained in:
122
Include/ZRenderer/ZShader.hpp
Normal file
122
Include/ZRenderer/ZShader.hpp
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
ZShader.hpp
|
||||
Author: Chris Ertel <crertel@762studios.com>,
|
||||
James Russell <jcrussell@762studios.com>
|
||||
Created: 4/20/2011
|
||||
|
||||
Purpose:
|
||||
|
||||
TODO
|
||||
|
||||
License:
|
||||
|
||||
TODO
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _ZSHADER_HPP
|
||||
#define _ZSHADER_HPP
|
||||
|
||||
#include <ZRenderer/ZRendererBuild.hpp>
|
||||
#include <ZRenderer/ZRendererResource.hpp>
|
||||
|
||||
#include <ZSTL/ZString.hpp>
|
||||
|
||||
//Shader Type
|
||||
enum ZShaderType
|
||||
{
|
||||
ZST_SOFT, //Software Shader (unsupported)
|
||||
ZST_VERTEX, //Vertex Shader
|
||||
ZST_FRAGMENT, //Fragment/Pixel Shader
|
||||
ZST_GEOMETRY, //Geometry Shader (unsupported)
|
||||
ZST_HULL, //Hull Shader (unsupported)
|
||||
ZST_DOMAIN, //Domain Shader (unsupported)
|
||||
ZST_SIZE
|
||||
};
|
||||
|
||||
//For you non OpenGL types
|
||||
#define ZST_PIXEL (ZST_FRAGMENT)
|
||||
|
||||
class ZShader : public ZRendererResource
|
||||
{
|
||||
public:
|
||||
/*
|
||||
virtual public ZShader::ClearLog
|
||||
|
||||
Function to clear the log of a shader.
|
||||
|
||||
@return (void)
|
||||
@context (all)
|
||||
*/
|
||||
virtual void ClearCompileLog() = 0;
|
||||
|
||||
/*
|
||||
virtual public ZShdaer::Compile
|
||||
|
||||
Function to compile a shader.
|
||||
|
||||
@return (bool) - true if successfully compiled, false otherwise.
|
||||
@context (all)
|
||||
*/
|
||||
virtual bool Compile() = 0;
|
||||
|
||||
/*
|
||||
virtual public ZShdaer::IsUsable
|
||||
|
||||
Function to compile a shader.
|
||||
|
||||
@return (bool) - true if successfully compiled, false otherwise.
|
||||
@context (all)
|
||||
*/
|
||||
virtual bool IsUsable() = 0;
|
||||
|
||||
/*
|
||||
virtual public ZShader::GetLog
|
||||
|
||||
Function to get the log of a shader.
|
||||
|
||||
@return (ZString) - the log of the shader.
|
||||
@context (all)
|
||||
*/
|
||||
virtual const ZString& GetCompileLog() = 0;
|
||||
|
||||
/*
|
||||
virtual public ZShader::GetSource
|
||||
|
||||
Function to get the source of a shader.
|
||||
|
||||
@return (ZString) - the source of the shader.
|
||||
@context (all)
|
||||
*/
|
||||
virtual const ZString& GetSource() = 0;
|
||||
|
||||
/*
|
||||
virtual public ZShader::GetType
|
||||
|
||||
Function to get the type of a shader.
|
||||
|
||||
ZST_SOFT : Soft shaders
|
||||
ZST_VERTEX : Vertex shaders
|
||||
ZST_HULL : Hull shaders
|
||||
ZST_DOMAIN : Domain shaders
|
||||
ZST_GEOMETRY: Geometry shaders
|
||||
ZST_FRAGMENT: Fragment (pixel) shaders
|
||||
|
||||
@return (ZShaderType) - type of shader.
|
||||
@context (all)
|
||||
*/
|
||||
virtual ZShaderType GetType() = 0;
|
||||
|
||||
/*
|
||||
virtual public ZShader::SetSource
|
||||
|
||||
Function to set the source of a shader.
|
||||
|
||||
@param _source - shader source, as a string
|
||||
@return (void)
|
||||
@context (all)
|
||||
*/
|
||||
virtual void SetSource(const ZString& _source) = 0;
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user