From 59977e47de679d9b41e5d0da1bc709429d0f903a Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 1 Jun 2017 10:24:13 +0100 Subject: [PATCH] Use GLSL highlighting for now on vulkan source files * Later we should pipe through the source language from the SPIR-V and use that instead, for the other APIs it's just trivially HLSL/GLSL. --- qrenderdoc/Windows/ShaderViewer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qrenderdoc/Windows/ShaderViewer.cpp b/qrenderdoc/Windows/ShaderViewer.cpp index 44a272075..ea10788d1 100644 --- a/qrenderdoc/Windows/ShaderViewer.cpp +++ b/qrenderdoc/Windows/ShaderViewer.cpp @@ -526,9 +526,8 @@ void ShaderViewer::OnEventChanged(uint32_t eventID) ScintillaEdit *ShaderViewer::AddFileScintilla(const QString &name, const QString &text) { - ScintillaEdit *scintilla = - MakeEditor(lit("scintilla") + name, text, - m_Ctx.APIProps().localRenderer == GraphicsAPI::OpenGL ? SCLEX_GLSL : SCLEX_HLSL); + ScintillaEdit *scintilla = MakeEditor( + lit("scintilla") + name, text, IsD3D(m_Ctx.APIProps().localRenderer) ? SCLEX_HLSL : SCLEX_GLSL); scintilla->setReadOnly(true); scintilla->setWindowTitle(name); ((QWidget *)scintilla)->setProperty("name", name);