diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-04-06 16:29:50 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-04-06 16:29:50 +0000 |
| commit | ea0c5eacdd91a1c17502eb2ba36093ac054572ce (patch) | |
| tree | 827f3dc2613ecd5138126fd7cd22d850c42c7c9d /Projects | |
| parent | Refactored overloaded IPipelineState::GetStaticShaderVariable and IShaderReso... (diff) | |
| download | DiligentEngine-ea0c5eacdd91a1c17502eb2ba36093ac054572ce.tar.gz DiligentEngine-ea0c5eacdd91a1c17502eb2ba36093ac054572ce.zip | |
Updated API version to 240021
Diffstat (limited to 'Projects')
| -rw-r--r-- | Projects/Asteroids/src/asteroids_DE.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Projects/Asteroids/src/asteroids_DE.cpp b/Projects/Asteroids/src/asteroids_DE.cpp index cbbf3a6..4f85168 100644 --- a/Projects/Asteroids/src/asteroids_DE.cpp +++ b/Projects/Asteroids/src/asteroids_DE.cpp @@ -39,7 +39,6 @@ #include "EngineFactoryVk.h" #endif -#include "BasicShaderSourceStreamFactory.h" #include "MapHelper.h" #include "util.h" @@ -213,7 +212,8 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G } mSprite.reset( new GUISprite(5, 10, 140, 50, spriteFile) ); - BasicShaderSourceStreamFactory BasicSSSFactory({"src"}); + RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceFactory; + mDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory("src", &pShaderSourceFactory); std::vector<StateTransitionDesc> Barriers; mBackBufferWidth = mSwapChain->GetDesc().Width; @@ -252,7 +252,7 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G attribs.EntryPoint = "asteroid_vs"; attribs.FilePath = "asteroid_vs.hlsl"; attribs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; - attribs.pShaderSourceStreamFactory = &BasicSSSFactory; + attribs.pShaderSourceStreamFactory = pShaderSourceFactory; attribs.UseCombinedTextureSamplers = true; mDevice->CreateShader(attribs, &vs); } @@ -263,7 +263,7 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G attribs.Desc.Name = "Asteroids PS"; attribs.EntryPoint = "asteroid_ps_d3d11"; attribs.FilePath = "asteroid_ps_d3d11.hlsl"; - attribs.pShaderSourceStreamFactory = &BasicSSSFactory; + attribs.pShaderSourceStreamFactory = pShaderSourceFactory; attribs.UseCombinedTextureSamplers = true; attribs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; mDevice->CreateShader(attribs, &ps); @@ -366,7 +366,7 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G attribs.FilePath = "skybox_vs.hlsl"; attribs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; attribs.UseCombinedTextureSamplers = true; - attribs.pShaderSourceStreamFactory = &BasicSSSFactory; + attribs.pShaderSourceStreamFactory = pShaderSourceFactory; mDevice->CreateShader(attribs, &vs); attribs.Desc.Name = "Skybox PS"; @@ -464,7 +464,7 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G attribs.FilePath = "sprite_vs.hlsl"; attribs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; attribs.UseCombinedTextureSamplers = true; - attribs.pShaderSourceStreamFactory = &BasicSSSFactory; + attribs.pShaderSourceStreamFactory = pShaderSourceFactory; mDevice->CreateShader(attribs, &sprite_vs); } @@ -476,7 +476,7 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G attribs.FilePath = "sprite_ps.hlsl"; attribs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; attribs.UseCombinedTextureSamplers = true; - attribs.pShaderSourceStreamFactory = &BasicSSSFactory; + attribs.pShaderSourceStreamFactory = pShaderSourceFactory; mDevice->CreateShader(attribs, &sprite_ps); } @@ -488,7 +488,7 @@ Asteroids::Asteroids(const Settings &settings, AsteroidsSimulation* asteroids, G attribs.FilePath = "font_ps.hlsl"; attribs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; attribs.UseCombinedTextureSamplers = true; - attribs.pShaderSourceStreamFactory = &BasicSSSFactory; + attribs.pShaderSourceStreamFactory = pShaderSourceFactory; mDevice->CreateShader(attribs, &font_ps); } |
