Files
ResInsight/VisualizationModules/LibRender/cvfShaderSourceRepository.h
2012-05-18 09:45:23 +02:00

93 lines
2.5 KiB
C++

//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2012 Ceetron AS
//
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include "cvfObject.h"
#include "cvfString.h"
namespace cvf {
class CharArray;
//==================================================================================================
//
//
//
//==================================================================================================
class ShaderSourceRepository : public Object
{
public:
enum ShaderIdent
{
calcClipDistances,
calcShadowCoord,
src_Color,
src_Texture,
src_TextureGlobalAlpha,
src_TextureFromPointCoord,
src_TextureRectFromFragCoord_v33,
light_Phong,
light_PhongDual,
light_SimpleHeadlight,
light_SimpleHeadlight_spec_uniform,
light_AmbientDiffuse,
checkDiscard_ClipDistances,
vs_Standard,
vs_EnvironmentMapping,
vs_FullScreenQuad,
vs_Minimal,
vs_MinimalTexture,
vs_VectorDrawer,
vs_DistanceScaledPoints,
vs_ParticleTraceComets,
fs_Standard,
fs_Shadow_v33,
fs_Unlit,
fs_Void,
fs_FixedColorMagenta,
fs_Text,
fs_VectorDrawer,
fs_CenterLitSpherePoints,
fs_ParticleTraceComets,
fs_GradientTopBottom,
fs_GradientTopMiddleBottom,
gs_PassThroughTriangle_v33
};
public:
ShaderSourceRepository();
virtual ~ShaderSourceRepository();
String shaderSource(ShaderIdent shaderIdent);
static const char* shaderIdentString(ShaderIdent shaderIdent);
protected:
virtual bool rawShaderSource(ShaderIdent shaderIdent, CharArray* rawSource);
};
}