/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
release-20.2
Code/Samples/ComputeShaderHistogram/Main.h
51 строка
1 KB
Jan Krassnigg
Follow up fixes for the ezActor introduction (#57)
17 июн 2019, 17:22
Не верифицирован
17 июн 2019, 17:22
5f145b1
Код
Авторство
О чём код?
#pragma once #include <GameEngine/GameApplication/GameApplication.h> #include <Foundation/Types/UniquePtr.h> #include <RendererCore/Meshes/MeshResource.h> #include <RendererCore/Material/MaterialResource.h> #include <Foundation/IO/DirectoryWatcher.h> class ezWindow; class ezDirectoryWatcher; /// Uses shader reloading mechanism of the ShaderExplorer sample for quick prototyping. class ezComputeShaderHistogramApp : public ezGameApplication { public: typedef ezGameApplication SUPER; ezComputeShaderHistogramApp(); ~ezComputeShaderHistogramApp(); virtual ezApplication::ApplicationExecution Run() override; virtual void AfterCoreSystemsStartup() override; virtual void BeforeHighLevelSystemsShutdown() override; private: void CreateHistogramQuad(); void OnFileChanged(const char* filename, ezDirectoryWatcherAction action); ezGALTextureHandle m_hScreenTexture; ezGALRenderTargetViewHandle m_hScreenRTV; ezGALResourceViewHandle m_hScreenSRV; // Could use buffer, but access and organisation with texture is more straight forward. ezGALTextureHandle m_hHistogramTexture; ezGALUnorderedAccessViewHandle m_hHistogramUAV; ezGALResourceViewHandle m_hHistogramSRV; ezGALRenderTargetViewHandle m_hBackbufferRTV; ezShaderResourceHandle m_hScreenShader; ezShaderResourceHandle m_hHistogramDisplayShader; ezShaderResourceHandle m_hHistogramComputeShader; ezMeshBufferResourceHandle m_hHistogramQuadMeshBuffer; ezUniquePtr<ezDirectoryWatcher> m_directoryWatcher; bool m_stuffChanged; };