Sun, 09 Apr 2023 16:01:38 +0300
Removed unused code
69 | 1 | /* |
2 | * LDForge: LDraw parts authoring CAD | |
3 | * Copyright (C) 2020 Teemu Piippo | |
4 | * | |
5 | * This program is free software: you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License as published by | |
7 | * the Free Software Foundation, either version 3 of the License, or | |
8 | * (at your option) any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
18 | ||
234
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
19 | #include <QPainter> |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
20 | #include <QPainterPath> |
264
76a025db4948
Convert all includes to be relative to project root directory. Files that cannot be found in this manner use angle brackets.
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
263
diff
changeset
|
21 | #include "src/gl/partrenderer.h" |
76a025db4948
Convert all includes to be relative to project root directory. Files that cannot be found in this manner use angle brackets.
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
263
diff
changeset
|
22 | #include "src/layers/axeslayer.h" |
69 | 23 | |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
24 | static constexpr char vertexShaderSource[] = R"( |
69 | 25 | #version 330 core |
26 | ||
27 | layout (location = 0) in vec3 in_position; | |
28 | layout (location = 1) in vec3 in_color; | |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
29 | uniform mat4 mvp; |
69 | 30 | smooth out vec3 ex_color; |
31 | ||
32 | void main() | |
33 | { | |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
34 | gl_Position = mvp * vec4(in_position, 1.0); |
70 | 35 | ex_color = in_color; |
69 | 36 | } |
37 | )"; | |
38 | ||
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
39 | static constexpr char fragmentShaderSource[] = R"( |
69 | 40 | #version 330 core |
41 | ||
42 | out vec4 color; | |
43 | smooth in vec3 ex_color; | |
44 | ||
45 | void main(void) | |
46 | { | |
70 | 47 | color = vec4(ex_color, 1); |
69 | 48 | } |
49 | )"; | |
50 | ||
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
51 | void AxesLayer::initializeGL() |
69 | 52 | { |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
53 | constexpr struct VertexType |
69 | 54 | { |
55 | glm::vec3 position; | |
56 | glm::vec3 color; | |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
57 | } data[] = { |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
58 | {{10000, 0, 0}, {1, 0, 0}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
59 | {{0, 0, 0}, {1, 0, 0}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
60 | {{-10000, 0, 0}, {0.5, 0, 0}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
61 | {{0, 0, 0}, {0.5, 0, 0}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
62 | {{0, 10000, 0}, {0, 1, 0}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
63 | {{0, 0, 0}, {0, 1, 0}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
64 | {{0, -10000, 0}, {0, 0.5, 0}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
65 | {{0, 0, 0}, {0, 0.5, 0}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
66 | {{0, 0, 10000}, {0, 0, 1}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
67 | {{0, 0, 0}, {0, 0, 1}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
68 | {{0, 0, -10000}, {0, 0, 0.5}}, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
69 | {{0, 0, 0}, {0, 0, 0.5}}, |
69 | 70 | }; |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
71 | constexpr int stride = sizeof(VertexType); |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
72 | this->shader.initialize( |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
73 | ::vertexShaderSource, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
74 | ::fragmentShaderSource, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
75 | QOpenGLBuffer::StaticDraw, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
76 | { |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
77 | GLAttributeSpec{ |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
78 | .type = GL_FLOAT, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
79 | .offset = offsetof(VertexType, position), |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
80 | .tuplesize = 3, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
81 | .stride = stride, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
82 | }, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
83 | { |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
84 | .type = GL_FLOAT, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
85 | .offset = offsetof(VertexType, color), |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
86 | .tuplesize = 3, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
87 | .stride = stride, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
88 | }, |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
89 | }); |
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
90 | this->shader.bufferData(&data[0], countof(data), sizeof data[0]); |
69 | 91 | } |
92 | ||
234
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
93 | void AxesLayer::overpaint(QPainter* painter) |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
94 | { |
245
a41ccc6924e3
improve text rendering
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
234
diff
changeset
|
95 | painter->save(); |
234
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
96 | QFont font; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
97 | font.setStyle(QFont::StyleItalic); |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
98 | font.setBold(true); |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
99 | painter->setFont(font); |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
100 | QFontMetrics fontMetrics{font}; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
101 | const auto renderText = [&](const QString& text, const PointOnRectagle& intersection) |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
102 | { |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
103 | QPointF position = toQPointF(intersection.position); |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
104 | const RectangleSide side = intersection.side; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
105 | switch (side) |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
106 | { |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
107 | case RectangleSide::Top: |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
108 | position += QPointF{0, static_cast<qreal>(fontMetrics.ascent())}; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
109 | break; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
110 | case RectangleSide::Left: |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
111 | break; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
112 | case RectangleSide::Bottom: |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
113 | position += QPointF{0, static_cast<qreal>(-fontMetrics.descent())}; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
114 | break; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
115 | case RectangleSide::Right: |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
116 | position += QPointF{static_cast<qreal>(-fontMetrics.horizontalAdvance(text)), 0}; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
117 | break; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
118 | } |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
119 | drawBorderedText(painter, position, font, text); |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
120 | }; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
121 | const QRectF box {QPointF{0, 0}, sizeToSizeF(this->renderer->size())}; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
122 | const QPointF p1 = this->renderer->modelToScreenCoordinates(glm::vec3{0, 0, 0}); |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
123 | static const struct |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
124 | { |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
125 | QString text; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
126 | glm::vec3 direction; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
127 | } directions[] = |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
128 | { |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
129 | {"+x", {1, 0, 0}}, |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
130 | {"-x", {-1, 0, 0}}, |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
131 | {"+y", {0, 1, 0}}, |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
132 | {"-y", {0, -1, 0}}, |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
133 | {"+z", {0, 0, 1}}, |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
134 | {"-z", {0, 0, -1}}, |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
135 | }; |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
136 | for (const auto& axis : directions) |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
137 | { |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
138 | const QPointF x_p = this->renderer->modelToScreenCoordinates(axis.direction); |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
139 | const auto intersection = rayRectangleIntersection( |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
140 | rayFromPoints(toVec2(p1), toVec2(x_p)), |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
141 | box); |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
142 | if (intersection.has_value()) |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
143 | { |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
144 | renderText(axis.text, *intersection); |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
145 | } |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
146 | } |
245
a41ccc6924e3
improve text rendering
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
234
diff
changeset
|
147 | painter->restore(); |
234
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
148 | } |
87ee9824210b
Readd axis labels, fix antialiasing
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
149 | |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
150 | void AxesLayer::paintGL() |
69 | 151 | { |
216
c7241f504117
Reworked grid program into a render layer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
215
diff
changeset
|
152 | glLineWidth(5); |
c7241f504117
Reworked grid program into a render layer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
215
diff
changeset
|
153 | glEnable(GL_LINE_SMOOTH); |
c7241f504117
Reworked grid program into a render layer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
215
diff
changeset
|
154 | glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
155 | this->shader.draw(GL_LINES); |
216
c7241f504117
Reworked grid program into a render layer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
215
diff
changeset
|
156 | glDisable(GL_LINE_SMOOTH); |
69 | 157 | } |
158 | ||
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
159 | void AxesLayer::mvpMatrixChanged(const glm::mat4& mvpMatrix) |
69 | 160 | { |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
118
diff
changeset
|
161 | this->shader.setMvpMatrix(mvpMatrix); |
69 | 162 | } |