RAMSES Documentation  27.0.130
Information for RAMSES users and developers
EffectDescription.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2014 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_EFFECTDESCRIPTION_H
10 #define RAMSES_EFFECTDESCRIPTION_H
11 
14 
15 namespace ramses
16 {
21  {
22  public:
27 
34  status_t setVertexShader(const char* shaderSource);
41  status_t setFragmentShader(const char* shaderSource);
48  status_t setGeometryShader(const char* shaderSource);
55  status_t setVertexShaderFromFile(const char* shaderSourceFileName);
62  status_t setFragmentShaderFromFile(const char* shaderSourceFileName);
69  status_t setGeometryShaderFromFile(const char* shaderSourceFileName);
77  status_t addCompilerDefine(const char* define);
78 
90  status_t setUniformSemantic(const char* inputName, EEffectUniformSemantic semanticType);
91 
101  status_t setAttributeSemantic(const char* inputName, EEffectAttributeSemantic semanticType);
102 
107  const char* getVertexShader() const;
112  const char* getFragmentShader() const;
117  const char* getGeometryShader() const;
118 
123  uint32_t getNumberOfCompilerDefines() const;
129  const char* getCompilerDefine(uint32_t index) const;
130 
134  class EffectDescriptionImpl& impl;
135 
136  protected:
140  friend class RamsesClientImpl;
141  };
142 }
143 
144 #endif
#define RAMSES_API
Definition: APIExport.h:35
An effect description holds all necessary information for an effect to be created.
Definition: EffectDescription.h:21
class EffectDescriptionImpl & impl
Stores internal data for implementation specifics of EffectDescription.
Definition: EffectDescription.h:134
status_t setGeometryShaderFromFile(const char *shaderSourceFileName)
Reads and sets geometry shader source from file.
const char * getGeometryShader() const
Gets geometry shader code that is currently set.
EffectDescription()
Constructor of EffectDescription.
status_t setVertexShader(const char *shaderSource)
Sets vertex shader source from string.
uint32_t getNumberOfCompilerDefines() const
Gets number of compiler defines.
const char * getFragmentShader() const
Gets fragment shader code that is currently set.
status_t setFragmentShader(const char *shaderSource)
Sets fragment shader source from string.
status_t setAttributeSemantic(const char *inputName, EEffectAttributeSemantic semanticType)
Sets an attribute semantic. Used to mark attributes as special inputs (eg. text specific inputs)....
status_t setVertexShaderFromFile(const char *shaderSourceFileName)
Reads and sets vertex shader source from file.
status_t setUniformSemantic(const char *inputName, EEffectUniformSemantic semanticType)
Sets an uniform semantic. Used for uniforms which are not locally available on the client,...
status_t setGeometryShader(const char *shaderSource)
Sets geometry shader source from string.
const char * getCompilerDefine(uint32_t index) const
Gets compiler define.
status_t addCompilerDefine(const char *define)
Adds a compiler define. The define string will be injected as defined into the final shader code.
const char * getVertexShader() const
Gets vertex shader code.
status_t setFragmentShaderFromFile(const char *shaderSourceFileName)
Reads and sets fragment shader source from file.
The StatusObject provides status message handling.
Definition: StatusObject.h:22
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26
EEffectUniformSemantic
Effect uniform semantic type.
Definition: EffectInputSemantic.h:18
EEffectAttributeSemantic
Effect attribute semantic type.
Definition: EffectInputSemantic.h:42