Skip to content

Commit 195ac15

Browse files
committed
Remove unused function (closes #223)
1 parent 6055434 commit 195ac15

File tree

1 file changed

+36
-45
lines changed

1 file changed

+36
-45
lines changed

source/glowutils/source/CameraPathPlayer.cpp

Lines changed: 36 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,42 @@
2323

2424
using namespace glm;
2525

26+
namespace {
27+
28+
const char* vertexSource = R"(
29+
#version 140
30+
#extension GL_ARB_explicit_attrib_location : require
31+
32+
uniform mat4 transform;
33+
34+
layout(location = 0) in vec4 vertex;
35+
36+
out float t;
37+
38+
void main()
39+
{
40+
gl_Position = transform * vec4(vertex.xyz, 1.0);
41+
t = vertex.w;
42+
43+
}
44+
)";
45+
46+
const char* fragmentSource = R"(
47+
#version 140
48+
#extension GL_ARB_explicit_attrib_location : require
49+
50+
layout(location=0) out vec4 fragColor;
51+
52+
in float t;
53+
54+
void main()
55+
{
56+
fragColor = vec4(vec3(1.0, 0.2+t*0.8, t/2.0), 1.0);
57+
}
58+
)";
59+
60+
}
61+
2662
namespace glowutils
2763
{
2864

@@ -86,51 +122,6 @@ void CameraPathPlayer::prepare()
86122
prepareControlPoints();
87123
}
88124

89-
namespace {
90-
vec3 intersection(const vec3& a, const vec3& r, const vec3& p, const vec3& n)
91-
{
92-
float rDotN = dot(r, n);
93-
94-
assert(std::abs(rDotN) < std::numeric_limits<float>::epsilon());
95-
96-
float t = dot(p - a, n) / rDotN;
97-
return a + r * t;
98-
}
99-
100-
const char* vertexSource = R"(
101-
#version 140
102-
#extension GL_ARB_explicit_attrib_location : require
103-
104-
uniform mat4 transform;
105-
106-
layout(location = 0) in vec4 vertex;
107-
108-
out float t;
109-
110-
void main()
111-
{
112-
gl_Position = transform * vec4(vertex.xyz, 1.0);
113-
t = vertex.w;
114-
115-
}
116-
)";
117-
118-
const char* fragmentSource = R"(
119-
#version 140
120-
#extension GL_ARB_explicit_attrib_location : require
121-
122-
layout(location=0) out vec4 fragColor;
123-
124-
in float t;
125-
126-
void main()
127-
{
128-
fragColor = vec4(vec3(1.0, 0.2+t*0.8, t/2.0), 1.0);
129-
}
130-
)";
131-
132-
}
133-
134125
void CameraPathPlayer::prepareControlPoints()
135126
{
136127
const std::vector<CameraPathPoint>& points = m_path.points();

0 commit comments

Comments
 (0)