forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEsslShaderGenerator.h
More file actions
49 lines (35 loc) · 1.59 KB
/
EsslShaderGenerator.h
File metadata and controls
49 lines (35 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// TM & (c) 2021 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
// All rights reserved. See LICENSE.txt for license.
//
#ifndef MATERIALX_ESSLSHADERGENERATOR_H
#define MATERIALX_ESSLSHADERGENERATOR_H
/// @file
/// ESSL shader generator
#include <MaterialXGenGlsl/GlslShaderGenerator.h>
MATERIALX_NAMESPACE_BEGIN
using EsslShaderGeneratorPtr = shared_ptr<class EsslShaderGenerator>;
/// @class EsslShaderGenerator
/// An ESSL (OpenGL ES Shading Language) shader generator
class MX_GENGLSL_API EsslShaderGenerator : public GlslShaderGenerator
{
public:
EsslShaderGenerator();
static ShaderGeneratorPtr create() { return std::make_shared<EsslShaderGenerator>(); }
/// Return a unique identifier for the target this generator is for
const string& getTarget() const override { return TARGET; }
/// Return the version string for the ESSL version this generator is for
const string& getVersion() const override { return VERSION; }
string getVertexDataPrefix(const VariableBlock& vertexData) const override;
/// Unique identifier for this generator target
static const string TARGET;
static const string VERSION;
protected:
void emitDirectives(GenContext& context, ShaderStage& stage) const override;
void emitUniforms(GenContext& context, ShaderStage& stage) const override;
void emitInputs(GenContext& context, ShaderStage& stage) const override;
void emitOutputs(GenContext& context, ShaderStage& stage) const override;
HwResourceBindingContextPtr getResourceBindingContext(GenContext& context) const override;
};
MATERIALX_NAMESPACE_END
#endif