Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#5584: Start expanding the RenderSystem interface to provide a separa…
…te method to acquire built-in shaders. This should replace all the shaders addressed by magic strings like "$WIRE_OVERLAY".
- Loading branch information
1 parent
8bd6ca6
commit 60f78e5
Showing
10 changed files
with
97 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "BuiltInShader.h" | ||
|
||
#include "string/convert.h" | ||
|
||
namespace render | ||
{ | ||
|
||
BuiltInShader::BuiltInShader(BuiltInShaderType type, OpenGLRenderSystem& renderSystem) : | ||
OpenGLShader(GetNameForType(type), renderSystem) | ||
{} | ||
|
||
|
||
|
||
std::string BuiltInShader::GetNameForType(BuiltInShaderType type) | ||
{ | ||
return "$BUILT_IN_SHADER[" + string::to_string(static_cast<std::size_t>(type)) + "]"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include "OpenGLShader.h" | ||
|
||
namespace render | ||
{ | ||
|
||
class BuiltInShader : | ||
public OpenGLShader | ||
{ | ||
public: | ||
BuiltInShader(BuiltInShaderType type, OpenGLRenderSystem& renderSystem); | ||
|
||
static std::string GetNameForType(BuiltInShaderType type); | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters