From a9d2bb1e1c6b815c0953dd8e39ea23a2d69684a2 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Tue, 16 Jun 2015 20:07:35 +0200 Subject: [PATCH] Coding standard --- libraries/model/src/model/Skybox.cpp | 4 ++-- libraries/octree/src/ViewFrustum.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/model/src/model/Skybox.cpp b/libraries/model/src/model/Skybox.cpp index 933c737b83..10199adda3 100755 --- a/libraries/model/src/model/Skybox.cpp +++ b/libraries/model/src/model/Skybox.cpp @@ -72,7 +72,7 @@ void Skybox::render(gpu::Batch& batch, const ViewFrustum& viewFrustum, const Sky thePipeline = gpu::PipelinePointer(gpu::Pipeline::create(skyShader, skyState)); - const float CLIP = 1.0; + const float CLIP = 1.0f; const glm::vec2 vertices[4] = { {-CLIP, -CLIP}, {CLIP, -CLIP}, {-CLIP, CLIP}, {CLIP, CLIP}}; theBuffer.reset(new gpu::Buffer(sizeof(vertices), (const gpu::Byte*) vertices)); @@ -110,7 +110,7 @@ void Skybox::render(gpu::Batch& batch, const ViewFrustum& viewFrustum, const Sky } else { // skybox has no cubemap, just clear the color buffer auto color = skybox.getColor(); - batch.clearFramebuffer(gpu::Framebuffer::BUFFER_COLOR0, glm::vec4(color, 0.0f), 0.f, 0); + batch.clearFramebuffer(gpu::Framebuffer::BUFFER_COLOR0, glm::vec4(color, 0.0f), 0.0f, 0); } } diff --git a/libraries/octree/src/ViewFrustum.cpp b/libraries/octree/src/ViewFrustum.cpp index 80f0023970..415552f1d6 100644 --- a/libraries/octree/src/ViewFrustum.cpp +++ b/libraries/octree/src/ViewFrustum.cpp @@ -545,9 +545,9 @@ void ViewFrustum::printDebugDetails() const { glm::vec2 ViewFrustum::projectPoint(glm::vec3 point, bool& pointInView) const { - glm::vec4 pointVec4 = glm::vec4(point,1); + glm::vec4 pointVec4 = glm::vec4(point, 1.0f); glm::vec4 projectedPointVec4 = _ourModelViewProjectionMatrix * pointVec4; - pointInView = (projectedPointVec4.w > 0); // math! If the w result is negative then the point is behind the viewer + pointInView = (projectedPointVec4.w > 0.0f); // math! If the w result is negative then the point is behind the viewer // what happens with w is 0??? float x = projectedPointVec4.x / projectedPointVec4.w;