diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml index 3c8be4e..d452abe 100644 --- a/.github/actions/install-dependencies/action.yml +++ b/.github/actions/install-dependencies/action.yml @@ -18,7 +18,7 @@ inputs: qt_ver: description: 'qt version' required: false - default: '6.7.0' + default: '6.7.2' type: string runs: diff --git a/cmake/qt.cmake b/cmake/qt.cmake index 5a7f536..56163b4 100644 --- a/cmake/qt.cmake +++ b/cmake/qt.cmake @@ -1,7 +1,7 @@ if(CMAKE_HOST_WIN32) - list(APPEND CMAKE_PREFIX_PATH "C:\\Qt\\6.7.0\\msvc2019_64") + list(APPEND CMAKE_PREFIX_PATH "C:\\Qt\\6.7.2\\msvc2019_64") elseif(CMAKE_HOST_APPLE) elseif(CMAKE_HOST_LINUX) - list(APPEND CMAKE_PREFIX_PATH "/opt/Qt/6.7.0/gcc_64") + list(APPEND CMAKE_PREFIX_PATH "/opt/Qt/6.7.2/gcc_64") endif() diff --git a/src/gpugraphics/openglview.cc b/src/gpugraphics/openglview.cc index 1ad7550..9f682e3 100644 --- a/src/gpugraphics/openglview.cc +++ b/src/gpugraphics/openglview.cc @@ -87,8 +87,7 @@ void OpenglView::resetToOriginalSize() d_ptr->transform.scale(factor_w, factor_h, 1.0); emit emitScaleFactor(); - QMetaObject::invokeMethod( - this, [this] { update(); }, Qt::QueuedConnection); + QMetaObject::invokeMethod(this, [this] { update(); }, Qt::QueuedConnection); } void OpenglView::fitToScreen() @@ -105,24 +104,21 @@ void OpenglView::fitToScreen() d_ptr->transform.scale(factor / factor_w, factor / factor_h, 1.0); emit emitScaleFactor(); - QMetaObject::invokeMethod( - this, [this] { update(); }, Qt::QueuedConnection); + QMetaObject::invokeMethod(this, [this] { update(); }, Qt::QueuedConnection); } void OpenglView::rotateNinetieth() { d_ptr->transform.rotate(90, 0, 0, 1); - QMetaObject::invokeMethod( - this, [this] { update(); }, Qt::QueuedConnection); + QMetaObject::invokeMethod(this, [this] { update(); }, Qt::QueuedConnection); } void OpenglView::anti_rotateNinetieth() { d_ptr->transform.rotate(-90, 0, 0, 1); - QMetaObject::invokeMethod( - this, [this] { update(); }, Qt::QueuedConnection); + QMetaObject::invokeMethod(this, [this] { update(); }, Qt::QueuedConnection); } void OpenglView::initializeGL() @@ -161,8 +157,7 @@ void OpenglView::resizeGL(int w, int h) } d_ptr->windowSize = QSize(w, h); - QMetaObject::invokeMethod( - this, [this] { update(); }, Qt::QueuedConnection); + QMetaObject::invokeMethod(this, [this] { update(); }, Qt::QueuedConnection); } void OpenglView::paintGL() @@ -195,8 +190,7 @@ void OpenglView::wheelEvent(QWheelEvent *event) d_ptr->transform.scale(factor, factor, 1.0); emit emitScaleFactor(); - QMetaObject::invokeMethod( - this, [this] { update(); }, Qt::QueuedConnection); + QMetaObject::invokeMethod(this, [this] { update(); }, Qt::QueuedConnection); } void OpenglView::mouseDoubleClickEvent(QMouseEvent *event) diff --git a/src/gpugraphics/shader/texture.frag b/src/gpugraphics/shader/texture.frag index 67afff0..45fb906 100644 --- a/src/gpugraphics/shader/texture.frag +++ b/src/gpugraphics/shader/texture.frag @@ -1,10 +1,12 @@ -#version 330 core +#version 330 +#ifdef GL_ARB_shading_language_420pack +#extension GL_ARB_shading_language_420pack : require +#endif -uniform sampler2D tex; // 纹理 +uniform sampler2D tex; -in vec2 TexCord; // 纹理坐标 - -out vec4 FragColor; // 输出颜色 +layout(location = 0) out vec4 FragColor; +in vec2 TexCord; void main() { diff --git a/src/gpugraphics/shader/texture.vert b/src/gpugraphics/shader/texture.vert index ebf053a..99c3083 100644 --- a/src/gpugraphics/shader/texture.vert +++ b/src/gpugraphics/shader/texture.vert @@ -1,14 +1,16 @@ -#version 330 core +#version 330 +#ifdef GL_ARB_shading_language_420pack +#extension GL_ARB_shading_language_420pack : require +#endif uniform mat4 transform; -in vec3 aPos; -in vec2 aTexCord; - -out vec2 TexCord; // 纹理坐标 +out vec2 TexCord; +layout(location = 0) in vec3 aPos; +layout(location = 1) in vec2 aTexCord; void main() { - gl_Position = transform * vec4(aPos, 1.0); TexCord = vec2(aTexCord.x, 1.0 - aTexCord.y); + gl_Position = transform * vec4(aPos, 1.0); } diff --git a/vcpkg.json b/vcpkg.json index 6a21ece..c21b57d 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -8,5 +8,5 @@ "crashpad", "giflib" ], - "builtin-baseline": "dee924de74e81388140a53c32a919ecec57d20ab" -} \ No newline at end of file + "builtin-baseline": "fe1cde61e971d53c9687cf9a46308f8f55da19fa" +}