From 70edbf70544fd55c2410636193d6623ed10f9afe Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 4 Jul 2023 08:30:04 +0800 Subject: [PATCH] - fix: GLFW project template. --- NEWS.md | 1 + platform/windows/templates/GLFW/GLFW_main.cpp.txt | 2 +- platform/windows/templates/GLFW/GLFW_main_zh_CN.cpp | 2 +- .../GLFW/{GLFW_shader.frag.txt => GLFW_shader.fs.txt} | 0 platform/windows/templates/GLFW/info.template | 4 ++-- 5 files changed, 5 insertions(+), 4 deletions(-) rename platform/windows/templates/GLFW/{GLFW_shader.frag.txt => GLFW_shader.fs.txt} (100%) diff --git a/NEWS.md b/NEWS.md index 611caf96..54d0931e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -25,6 +25,7 @@ Red Panda C++ Version 2.23 - enhancement: add "OI Wiki" and "turtle graphics tutorial" in help menu for zh_CN locale. - fix: Replace panel should be hidden after finding occurrencies. - enhancement: Show code completion suggestion after "typedef" and "const". + - fix: GLFW project template. Red Panda C++ Version 2.22 diff --git a/platform/windows/templates/GLFW/GLFW_main.cpp.txt b/platform/windows/templates/GLFW/GLFW_main.cpp.txt index 6aeb5582..e9156ea0 100644 --- a/platform/windows/templates/GLFW/GLFW_main.cpp.txt +++ b/platform/windows/templates/GLFW/GLFW_main.cpp.txt @@ -40,7 +40,7 @@ int main() glViewport(0, 0, WIDTH, HEIGHT); - Shader ourShader("shader.vs", "shader.frag"); + Shader ourShader("shader.vs", "shader.fs"); GLfloat vertices[] = { // Positions // Colors diff --git a/platform/windows/templates/GLFW/GLFW_main_zh_CN.cpp b/platform/windows/templates/GLFW/GLFW_main_zh_CN.cpp index b1811753..8572553c 100644 --- a/platform/windows/templates/GLFW/GLFW_main_zh_CN.cpp +++ b/platform/windows/templates/GLFW/GLFW_main_zh_CN.cpp @@ -40,7 +40,7 @@ int main() // 读取shader文件,并编译,见shader.h代码 - Shader ourShader("shader.vs", "shader.frag"); + Shader ourShader("shader.vs", "shader.fs"); // 一维数组,每六个代表一个顶点属性,前三个代表位置属性,后三个代表颜色属性 diff --git a/platform/windows/templates/GLFW/GLFW_shader.frag.txt b/platform/windows/templates/GLFW/GLFW_shader.fs.txt similarity index 100% rename from platform/windows/templates/GLFW/GLFW_shader.frag.txt rename to platform/windows/templates/GLFW/GLFW_shader.fs.txt diff --git a/platform/windows/templates/GLFW/info.template b/platform/windows/templates/GLFW/info.template index ab6dc489..8114ea72 100644 --- a/platform/windows/templates/GLFW/info.template +++ b/platform/windows/templates/GLFW/info.template @@ -18,8 +18,8 @@ Cpp=GLFW_shader.h.txt Cpp[zh_CN]=GLFW_shader_zh_CN.h [Unit2] -CppName=shader.frag -Cpp=GLFW_shader.frag.txt +CppName=shader.fs +Cpp=GLFW_shader.fs.txt [Unit3]