mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Fixing warnings
This commit is contained in:
parent
31948bce2d
commit
2c72037e81
3 changed files with 12 additions and 10 deletions
|
@ -14,10 +14,12 @@
|
|||
#include <GeometryCache.h>
|
||||
#include <RegisteredMetaTypes.h>
|
||||
|
||||
|
||||
QString const Circle3DOverlay::TYPE = "circle3d";
|
||||
|
||||
Circle3DOverlay::Circle3DOverlay() { }
|
||||
Circle3DOverlay::Circle3DOverlay() {
|
||||
memset(&_minorTickMarksColor, 0, sizeof(_minorTickMarksColor));
|
||||
memset(&_majorTickMarksColor, 0, sizeof(_majorTickMarksColor));
|
||||
}
|
||||
|
||||
Circle3DOverlay::Circle3DOverlay(const Circle3DOverlay* circle3DOverlay) :
|
||||
Planar3DOverlay(circle3DOverlay),
|
||||
|
@ -84,10 +86,10 @@ void Circle3DOverlay::render(RenderArgs* args) {
|
|||
|
||||
float pulseLevel = updatePulse();
|
||||
vec4 pulseModifier = vec4(1);
|
||||
if (_alphaPulse != 0.0) {
|
||||
if (_alphaPulse != 0.0f) {
|
||||
pulseModifier.a = (_alphaPulse >= 0.0f) ? pulseLevel : (1.0f - pulseLevel);
|
||||
}
|
||||
if (_colorPulse != 0.0) {
|
||||
if (_colorPulse != 0.0f) {
|
||||
float pulseValue = (_colorPulse >= 0.0f) ? pulseLevel : (1.0f - pulseLevel);
|
||||
pulseModifier = vec4(vec3(pulseValue), pulseModifier.a);
|
||||
}
|
||||
|
@ -103,7 +105,7 @@ void Circle3DOverlay::render(RenderArgs* args) {
|
|||
for (float angle = _startAt; angle <= _endAt; angle += SLICE_ANGLE) {
|
||||
float range = (angle - _startAt) / (_endAt - _startAt);
|
||||
float angleRadians = glm::radians(angle);
|
||||
points << glm::vec2(cos(angleRadians) * _outerRadius, sin(angleRadians) * _outerRadius);
|
||||
points << glm::vec2(cosf(angleRadians) * _outerRadius, sinf(angleRadians) * _outerRadius);
|
||||
colors << glm::mix(outerStartColor, outerEndColor, range);
|
||||
}
|
||||
} else {
|
||||
|
@ -112,10 +114,10 @@ void Circle3DOverlay::render(RenderArgs* args) {
|
|||
float range = (angle - _startAt) / (_endAt - _startAt);
|
||||
|
||||
float angleRadians = glm::radians(angle);
|
||||
points << glm::vec2(cos(angleRadians) * _innerRadius, sin(angleRadians) * _innerRadius);
|
||||
points << glm::vec2(cosf(angleRadians) * _innerRadius, sinf(angleRadians) * _innerRadius);
|
||||
colors << glm::mix(innerStartColor, innerEndColor, range);
|
||||
|
||||
points << glm::vec2(cos(angleRadians) * _outerRadius, sin(angleRadians) * _outerRadius);
|
||||
points << glm::vec2(cosf(angleRadians) * _outerRadius, sinf(angleRadians) * _outerRadius);
|
||||
colors << glm::mix(outerStartColor, outerEndColor, range);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,8 +78,8 @@ protected:
|
|||
float _minorTickMarksAngle { 0 };
|
||||
float _majorTickMarksLength { 0 };
|
||||
float _minorTickMarksLength { 0 };
|
||||
xColor _majorTickMarksColor {};
|
||||
xColor _minorTickMarksColor {};
|
||||
xColor _majorTickMarksColor;
|
||||
xColor _minorTickMarksColor;
|
||||
gpu::Primitive _solidPrimitive { gpu::TRIANGLE_FAN };
|
||||
int _quadVerticesID { 0 };
|
||||
int _lineVerticesID { 0 };
|
||||
|
|
|
@ -478,7 +478,7 @@ void GeometryCache::updateVertices(int id, const QVector<glm::vec2>& points, con
|
|||
const glm::vec3 NORMAL(0.0f, 0.0f, 1.0f);
|
||||
auto pointCount = points.size();
|
||||
auto colorCount = colors.size();
|
||||
int compactColor;
|
||||
int compactColor = 0;
|
||||
for (auto i = 0; i < pointCount; ++i) {
|
||||
const auto& point = points[i];
|
||||
*(vertex++) = point.x;
|
||||
|
|
Loading…
Reference in a new issue