CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
GLSLKeywords.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
13
16
17#include <memory>
18
20
21 // Returns the Keyword-to-Token map for GLSL.
23
24 // ---------------------------------------------------------------------------------------------
25
26 // Returns the GLSL keyword for the specified data type or null on failure.
28
29 // Returns the data type for the specified GLSL keyword or throws an std::runtime_error on failure.
31
32 // ---------------------------------------------------------------------------------------------
33
34 // Returns the GLSL keyword for the specified storage class or null on failure.
36
37 // Returns the storage class for the specified GLSL keyword or throws an std::runtime_error on failure.
39
40 // ---------------------------------------------------------------------------------------------
41
42 // Returns the GLSL keyword for the specified interpolation modifier or null on failure.
44
45 // Returns the interpolation modifier for the specified GLSL keyword or throws an std::runtime_error on failure.
47
48 // ---------------------------------------------------------------------------------------------
49
50 // Returns the GLSL keyword for the specified buffer type or null on failure.
51 const String* bufferTypeToGLSLKeyword(const BufferType t, bool useVulkanGLSL = false, bool separateSamplers = true);
52
53 // ---------------------------------------------------------------------------------------------
54
55 // Returns the GLSL keyword for the specified sampler type or null on failure.
57
58 // Returns the sampler type for the specified GLSL keyword or throws an std::runtime_error on failure.
60
61 // ---------------------------------------------------------------------------------------------
62
63 // Returns the GLSL keyword for the specified attribut type or null on failure.
65
66 // Returns the attribute type for the specified GLSL keyword or returns AttributeValue::Undefined.
68
69 // ---------------------------------------------------------------------------------------------
70
71 // Returns the GLSL keyword for the specified attribut value or null on failure.
73
74 // Returns the attribute value for the specified GLSL keyword or returns AttributeValue::Undefined.
76
77 // ---------------------------------------------------------------------------------------------
78
79 // Returns the GLSL keyword for the specified geometry primtive type or null on failure.
81
82 // Returns the primitive type for the specified GLSL keyword or throws an std::runtime_error on failure.
84
85 // ---------------------------------------------------------------------------------------------
86
87 // Returns the GLSL keyword for the specified image layout format or null on failure.
89
90 // ---------------------------------------------------------------------------------------------
91
92 // Returns the GLSL keyword for the specified semantic (special cases if 'useVulkanGLSL' is true).
93 // see https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt
95
96 // Returns the GLSL data type for specified semantic.
98
99 // ---------------------------------------------------------------------------------------------
100
101 // Returns the set of all reserved GLSL keywords (functions, intrinsics, types etc.).
103
104} // namespace CeresEngine::ShaderCompiler
Definition AST.hpp:33
StorageClass glslKeywordToStorageClass(const String &keyword)
AttributeValue
Definition ASTEnums.hpp:948
DataType semanticToGLSLDataType(const Semantic t)
const Set< String > & reservedGLSLKeywords()
const String * dataTypeToGLSLKeyword(const DataType t)
ImageLayoutFormat
Definition ASTEnums.hpp:642
const String * imageLayoutFormatToGLSLKeyword(const ImageLayoutFormat t)
InterpModifier
Definition ASTEnums.hpp:453
Semantic
Definition ASTEnums.hpp:1487
const KeywordMapType & glslKeywords()
PrimitiveType glslKeywordToPrimitiveType(const String &keyword)
InterpModifier glslKeywordToInterpModifier(const String &keyword)
AttributeValue glslKeywordToAttributeValue(const String &keyword)
Map< String, Token::Types > KeywordMapType
Definition Token.hpp:177
StorageClass
Definition ASTEnums.hpp:441
DataType
Definition ASTEnums.hpp:159
const String * attributeTypeToGLSLKeyword(const AttributeType t)
AttributeType glslKeywordToAttributeType(const String &keyword)
const String * samplerTypeToGLSLKeyword(const SamplerType t)
DataType glslKeywordToDataType(const String &keyword)
const String * interpModifierToGLSLKeyword(const InterpModifier t)
const String * storageClassToGLSLKeyword(const StorageClass t)
const String * attributeValueToGLSLKeyword(const AttributeValue t)
const String * primitiveTypeToGLSLKeyword(const PrimitiveType t)
BufferType
Definition ASTEnums.hpp:492
SamplerType glslKeywordToSamplerType(const String &keyword)
const String * bufferTypeToGLSLKeyword(const BufferType t, bool useVulkanGLSL=false, bool separateSamplers=true)
UPtr< String > semanticToGLSLKeyword(const IndexedSemantic &semantic, bool useVulkanGLSL=false)
PrimitiveType
Definition ASTEnums.hpp:425
SamplerType
Definition ASTEnums.hpp:571
AttributeType
Definition ASTEnums.hpp:766
std::unique_ptr< T, Deleter > UPtr
UPtr is a smart pointer that owns and manages another object through a pointer and disposes of that o...
Definition SmartPtr.hpp:28
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
std::set< Key, Compare, ScopedAllocatorAdaptor< StdAllocator< Key, RawAllocator > > > Set
Set is an associative container that contains a sorted set of unique objects of type Key.
Definition Set.hpp:21