Add command flag for picking between shaders
The new `-s`, `--shaders` command line flag allows you to specify whether you want to load the glsl or hlsl shaders. Defaults to glsl. Issue: #723
This commit is contained in:
parent
8c35694de9
commit
301e8abf12
7 changed files with 45 additions and 20 deletions
|
|
@ -110,7 +110,7 @@ public:
|
|||
}
|
||||
|
||||
// Initialize all Vulkan resources used by the ui
|
||||
void initResources(VkRenderPass renderPass, VkQueue copyQueue)
|
||||
void initResources(VkRenderPass renderPass, VkQueue copyQueue, const std::string& shadersPath)
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
|
|
@ -329,8 +329,8 @@ public:
|
|||
|
||||
pipelineCreateInfo.pVertexInputState = &vertexInputState;
|
||||
|
||||
shaderStages[0] = example->loadShader(getShadersPath() + "imgui/ui.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
|
||||
shaderStages[1] = example->loadShader(getShadersPath() + "imgui/ui.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
|
||||
shaderStages[0] = example->loadShader(shadersPath + "imgui/ui.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
|
||||
shaderStages[1] = example->loadShader(shadersPath + "imgui/ui.frag.spv", VK_SHADER_STAGE_FRAGMENT_BIT);
|
||||
|
||||
VK_CHECK_RESULT(vkCreateGraphicsPipelines(device->logicalDevice, pipelineCache, 1, &pipelineCreateInfo, nullptr, &pipeline));
|
||||
}
|
||||
|
|
@ -759,7 +759,7 @@ public:
|
|||
{
|
||||
imGui = new ImGUI(this);
|
||||
imGui->init((float)width, (float)height);
|
||||
imGui->initResources(renderPass, queue);
|
||||
imGui->initResources(renderPass, queue, getShadersPath());
|
||||
}
|
||||
|
||||
void prepare()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue