From 5dbef5525c0fcbc4e3519ee71ec24c52feeb8ed5 Mon Sep 17 00:00:00 2001 From: angeluriot Date: Tue, 19 Oct 2021 22:11:34 +0200 Subject: [PATCH] Change attribute to in --- imgui.ini | 4 ++-- libraries/Dimension3D/sources/opengl/Shader.cpp | 6 +++--- shaders/blur.vert | 4 ++-- shaders/galaxy.vert | 4 ++-- shaders/post.vert | 4 ++-- sources/Computer.cpp | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/imgui.ini b/imgui.ini index d387f38..b33fa91 100644 --- a/imgui.ini +++ b/imgui.ini @@ -1,6 +1,6 @@ [Window][InvisibleWindow] Pos=0,0 -Size=1920,1080 +Size=1440,810 Collapsed=0 [Window][Menu] @@ -34,5 +34,5 @@ Size=273,734 Collapsed=0 [Docking][Data] -DockSpace ID=0xF442860A Window=0xD8117908 Pos=0,0 Size=1920,1080 CentralNode=1 Selected=0x18B8C0DE +DockSpace ID=0xF442860A Window=0xD8117908 Pos=0,0 Size=1440,810 CentralNode=1 Selected=0x18B8C0DE diff --git a/libraries/Dimension3D/sources/opengl/Shader.cpp b/libraries/Dimension3D/sources/opengl/Shader.cpp index 10e1b4f..f0e68fc 100644 --- a/libraries/Dimension3D/sources/opengl/Shader.cpp +++ b/libraries/Dimension3D/sources/opengl/Shader.cpp @@ -21,9 +21,9 @@ namespace dim "#version 430\n" "precision mediump float;\n" "\n" - "attribute vec3 a_position;\n" - "attribute vec3 a_normal;\n" - "attribute vec2 a_texcoord;\n" + "in vec3 a_position;\n" + "in vec3 a_normal;\n" + "in vec2 a_texcoord;\n" "\n" "out vec3 v_position;\n" "out vec3 v_normal;\n" diff --git a/shaders/blur.vert b/shaders/blur.vert index 0e97757..0778e15 100644 --- a/shaders/blur.vert +++ b/shaders/blur.vert @@ -1,8 +1,8 @@ #version 430 precision mediump float; -attribute vec3 a_position; -attribute vec2 a_texcoord; +in vec3 a_position; +in vec2 a_texcoord; out vec2 v_blur_texcoord[17]; diff --git a/shaders/galaxy.vert b/shaders/galaxy.vert index cb4b071..a19ad14 100644 --- a/shaders/galaxy.vert +++ b/shaders/galaxy.vert @@ -1,8 +1,8 @@ #version 430 precision mediump float; -attribute vec4 a_position; -attribute vec4 a_speed; +in vec4 a_position; +in vec4 a_speed; out float v_brightness; diff --git a/shaders/post.vert b/shaders/post.vert index 9203c09..45d1c6c 100644 --- a/shaders/post.vert +++ b/shaders/post.vert @@ -1,8 +1,8 @@ #version 430 precision mediump float; -attribute vec3 a_position; -attribute vec2 a_texcoord; +in vec3 a_position; +in vec2 a_texcoord; out vec2 v_texcoord; diff --git a/sources/Computer.cpp b/sources/Computer.cpp index c4eead8..41b84f3 100644 --- a/sources/Computer.cpp +++ b/sources/Computer.cpp @@ -29,7 +29,7 @@ dim::Vector3 Computer::random_sphere() void Computer::create_galaxy(int i) { - positions[i].set_norm(pow(positions[i].get_norm() / (Simulator::galaxy_diameter / 2.f), 5) * (Simulator::galaxy_diameter / 2.f)); + positions[i].set_norm(static_cast(pow(positions[i].get_norm() / (Simulator::galaxy_diameter / 2.f), 5)) * (Simulator::galaxy_diameter / 2.f)); positions[i].y *= Simulator::galaxy_thickness / Simulator::galaxy_diameter; speeds[i] = dim::Vector4(dim::normalize(dim::Vector3(positions[i]) ^ dim::Vector3(0.f, 1.f, 0.f)) * Simulator::stars_speed, 0.f); }