CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Targets.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
12
14
38
40 enum class InputShaderVersion {
42 Cg = 2,
43
45 HLSL3 = 3,
46
48 HLSL4 = 4,
49
51 HLSL5 = 5,
52
54 HLSL6 = 6,
55
57 GLSL = 0x0000ffff,
58
60 ESSL = 0x0001ffff,
61
63 VKSL = 0x0002ffff,
64 };
65
69 GLSL110 = 110,
70
72 GLSL120 = 120,
73
75 GLSL130 = 130,
76
78 GLSL140 = 140,
79
81 GLSL150 = 150,
82
84 GLSL330 = 330,
85
87 GLSL400 = 400,
88
90 GLSL410 = 410,
91
93 GLSL420 = 420,
94
96 GLSL430 = 430,
97
99 GLSL440 = 440,
100
102 GLSL450 = 450,
103
105 GLSL460 = 460,
106
108 GLSL = 0x0000ffff,
109
111 ESSL100 = (0x00010000 + 100),
112
114 ESSL300 = (0x00010000 + 300),
115
117 ESSL310 = (0x00010000 + 310),
118
120 ESSL320 = (0x00010000 + 320),
121
123 ESSL = 0x0001ffff,
124
126 VKSL450 = (0x00020000 + 450),
127
129 VKSL = 0x0002ffff,
130 };
131
134
136 [[nodiscard]] String toString(const InputShaderVersion shaderVersion);
137
140
142 [[nodiscard]] bool isLanguageHLSL(const InputShaderVersion shaderVersion);
143
145 [[nodiscard]] bool isLanguageGLSL(const InputShaderVersion shaderVersion);
146
148 [[nodiscard]] bool isLanguageGLSL(const OutputShaderVersion shaderVersion);
149
151 [[nodiscard]] bool isLanguageESSL(const OutputShaderVersion shaderVersion);
152
154 [[nodiscard]] bool isLanguageVKSL(const OutputShaderVersion shaderVersion);
155
158
159} // namespace CeresEngine::ShaderCompiler
Definition AST.hpp:33
String toString(const CiString &s)
Definition CiString.hpp:20
bool isLanguageVKSL(const OutputShaderVersion shaderVersion)
Returns true if the shader output version specifies VKSL (for Vulkan).
bool isLanguageGLSL(const InputShaderVersion shaderVersion)
Returns true if the shader input version specifies GLSL (for OpenGL, OpenGL ES, and Vulkan).
InputShaderVersion
Input shader version enumeration.
Definition Targets.hpp:40
@ HLSL6
HLSL Shader Model 6.0 (DirectX 12).
@ HLSL3
HLSL Shader Model 3.0 (DirectX 9).
@ Cg
Cg (C for graphics) is a slightly extended HLSL3.
@ HLSL4
HLSL Shader Model 4.0 (DirectX 10).
@ HLSL5
HLSL Shader Model 5.0 (DirectX 11).
ShaderTarget
Shader target enumeration.
Definition Targets.hpp:16
@ TessellationEvaluationShader
Tessellation-evaluation (also Domain-) shader.
@ FragmentShader
Fragment (also Pixel-) shader.
@ TessellationControlShader
Tessellation-control (also Hull-) shader.
bool isLanguageHLSL(const InputShaderVersion shaderVersion)
Returns true if the shader input version specifies HLSL (for DirectX) or Cg (handled as dialect or HL...
OutputShaderVersion
Output shader version enumeration.
Definition Targets.hpp:67
bool isLanguageESSL(const OutputShaderVersion shaderVersion)
Returns true if the shader output version specifies ESSL (for OpenGL ES 2+).
const Map< String, int > & getGLSLExtensionEnumeration()
Returns the enumeration of all supported GLSL extensions as a map of extension name and version numbe...
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
std::map< Key, T, Compare, ScopedAllocatorAdaptor< StdAllocator< Pair< const Key, T >, RawAllocator > > > Map
Map is a sorted associative container that contains key-value pairs with unique keys.
Definition Map.hpp:24