Pyrogenesis trunk
Classes | Namespaces | Macros | Functions
ShaderProgram.cpp File Reference
#include "precompiled.h"
#include "ShaderProgram.h"
#include "graphics/Color.h"
#include "graphics/PreprocessorWrapper.h"
#include "graphics/ShaderManager.h"
#include "graphics/TextureManager.h"
#include "ps/CLogger.h"
#include "ps/containers/StaticVector.h"
#include "ps/Filesystem.h"
#include "ps/Profile.h"
#include "ps/XML/Xeromyces.h"
#include "renderer/backend/gl/Device.h"
#include "renderer/backend/gl/DeviceCommandContext.h"
#include "ps/XML/RelaxNG.h"
#include "ps/XML/XMLWriter.h"
#include <algorithm>
#include <map>
#include <tuple>
#include <unordered_map>
Include dependency graph for ShaderProgram.cpp:

Classes

struct  Renderer::Backend::GL::anonymous_namespace{ShaderProgram.cpp}::Binding
 
class  Renderer::Backend::GL::CShaderProgramARB
 
struct  Renderer::Backend::GL::CShaderProgramARB::BindingSlot
 
class  Renderer::Backend::GL::CShaderProgramGLSL
 
struct  Renderer::Backend::GL::CShaderProgramGLSL::ShaderStage
 
struct  Renderer::Backend::GL::CShaderProgramGLSL::BindingSlot
 

Namespaces

namespace  Renderer
 
namespace  Renderer::Backend
 
namespace  Renderer::Backend::GL
 
namespace  Renderer::Backend::GL::anonymous_namespace{ShaderProgram.cpp}
 

Macros

#define USE_SHADER_XML_VALIDATION   1
 
#define CASE(MATCH_STRING, TYPE, ELEMENT_TYPE, ELEMENT_COUNT)    if (str == MATCH_STRING) return {GL_ ## TYPE, GL_ ## ELEMENT_TYPE, ELEMENT_COUNT}
 
#define CASE(TYPE, ELEMENT_TYPE, ELEMENT_COUNT)
 
#define EL(x)   int el_##x = XeroFile.GetElementID(#x)
 
#define AT(x)   int at_##x = XeroFile.GetAttributeID(#x)
 

Functions

int Renderer::Backend::GL::anonymous_namespace{ShaderProgram.cpp}::GetStreamMask (const VertexAttributeStream stream)
 
GLint Renderer::Backend::GL::anonymous_namespace{ShaderProgram.cpp}::GLSizeFromFormat (const Format format)
 
GLenum Renderer::Backend::GL::anonymous_namespace{ShaderProgram.cpp}::GLTypeFromFormat (const Format format)
 
GLboolean Renderer::Backend::GL::anonymous_namespace{ShaderProgram.cpp}::NormalizedFromFormat (const Format format)
 
int Renderer::Backend::GL::anonymous_namespace{ShaderProgram.cpp}::GetAttributeLocationFromStream (CDevice *device, const VertexAttributeStream stream)
 
bool Renderer::Backend::GL::anonymous_namespace{ShaderProgram.cpp}::PreprocessShaderFile (bool arb, const CShaderDefines &defines, const VfsPath &path, const char *stage, CStr &source, std::vector< VfsPath > &fileDependencies)
 
std::tuple< GLenum, GLenum, GLintRenderer::Backend::GL::anonymous_namespace{ShaderProgram.cpp}::GetElementTypeAndCountFromString (const CStr &str)
 
bool Renderer::Backend::GL::anonymous_namespace{ShaderProgram.cpp}::CompileGLSL (GLuint shader, const VfsPath &file, const CStr &code)
 

Macro Definition Documentation

◆ AT

#define AT (   x)    int at_##x = XeroFile.GetAttributeID(#x)

◆ CASE [1/2]

#define CASE (   MATCH_STRING,
  TYPE,
  ELEMENT_TYPE,
  ELEMENT_COUNT 
)     if (str == MATCH_STRING) return {GL_ ## TYPE, GL_ ## ELEMENT_TYPE, ELEMENT_COUNT}

◆ CASE [2/2]

#define CASE (   TYPE,
  ELEMENT_TYPE,
  ELEMENT_COUNT 
)
Value:
case GL_ ## TYPE: \
bindingSlot.elementType = GL_ ## ELEMENT_TYPE; \
bindingSlot.elementCount = ELEMENT_COUNT; \
break;
#define TYPE(T)
Explicitly instantiate CGUISimpleSetting for the basic types.
Definition: CGUISetting.cpp:110

◆ EL

#define EL (   x)    int el_##x = XeroFile.GetElementID(#x)

◆ USE_SHADER_XML_VALIDATION

#define USE_SHADER_XML_VALIDATION   1