CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
GLSLPreProcessor.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
11
13
15
22 private:
23 bool mVersionDefined = false;
25
26 public:
27 GLSLPreProcessor(IncludeHandler& includeHandler, Log* log = nullptr);
28
29 private:
30 bool onDefineMacro(const Macro& macro) override;
31 bool onRedefineMacro(const Macro& macro, const Macro& previousMacro) override;
32 bool onUndefineMacro(const Macro& macro) override;
33 bool onSubstituteStdMacro(const Token& identifierToken, TokenPtrString& tokenString) override;
34
35 void parseDirective(const String& directive, bool ignoreUnknown) override;
36
39
40 bool verifyVersionNumber(const int* validVersions) const;
41 };
42
43} // namespace CeresEngine::ShaderCompiler
Pre-processor to substitute macros and include directives.
Definition GLSLPreProcessor.hpp:21
bool onSubstituteStdMacro(const Token &identifierToken, TokenPtrString &tokenString) override
GLSLPreProcessor(IncludeHandler &includeHandler, Log *log=nullptr)
void parseDirective(const String &directive, bool ignoreUnknown) override
bool verifyVersionNumber(const int *validVersions) const
bool onRedefineMacro(const Macro &macro, const Macro &previousMacro) override
bool onDefineMacro(const Macro &macro) override
Int32 mVersionNumber
Definition GLSLPreProcessor.hpp:24
bool onUndefineMacro(const Macro &macro) override
bool mVersionDefined
Definition GLSLPreProcessor.hpp:23
Interface for handling new include streams.
Definition IncludeHandler.hpp:21
Log base class.
Definition Log.hpp:19
Pre-processor to substitute macros and include directives.
Definition PreProcessor.hpp:38
Definition Token.hpp:21
Definition AST.hpp:33
std::int32_t Int32
Definition DataTypes.hpp:21
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25