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]