diff --git a/libraries/entities-renderer/src/RenderableDebugableEntityItem.cpp b/libraries/entities-renderer/src/RenderableDebugableEntityItem.cpp index a13ed5b06d..f103aaed4c 100644 --- a/libraries/entities-renderer/src/RenderableDebugableEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableDebugableEntityItem.cpp @@ -25,8 +25,8 @@ void RenderableDebugableEntityItem::renderBoundingBox(EntityItem* entity, Render gpu::Batch& batch = *args->_batch; auto shapeTransform = entity->getTransformToCenter(); - if (puffedOut != 0.0) { - shapeTransform.postScale(1.0 + puffedOut); + if (puffedOut != 0.0f) { + shapeTransform.postScale(1.0f + puffedOut); } batch.setModelTransform(Transform()); // we want to include the scale as well DependencyManager::get()->renderWireCubeInstance(batch, shapeTransform, color); diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index b120bb8a57..d23d60cf49 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -435,7 +435,7 @@ void DeferredLightingEffect::render(RenderArgs* args) { args->_context->getStereoProjections(projMats); args->_context->getStereoViews(eyeViews); - float halfWidth = 0.5 * sWidth; + float halfWidth = 0.5f * sWidth; for (int i = 0; i < numPasses; i++) { // In stereo, the 2 sides are layout side by side in the mono viewport and their width is half diff --git a/libraries/render-utils/src/GeometryCache.cpp b/libraries/render-utils/src/GeometryCache.cpp index c0404bdc41..1978e3b8c1 100644 --- a/libraries/render-utils/src/GeometryCache.cpp +++ b/libraries/render-utils/src/GeometryCache.cpp @@ -11,7 +11,7 @@ #include "GeometryCache.h" -#include +#include #include #include @@ -36,17 +36,18 @@ const int GeometryCache::UNKNOWN_ID = -1; -static const uint FLOATS_PER_VERTEX = 3; -static const uint VERTICES_PER_TRIANGLE = 3; -static const uint TRIANGLES_PER_QUAD = 2; -static const uint CUBE_FACES = 6; -static const uint CUBE_VERTICES_PER_FACE = 4; -static const uint CUBE_VERTICES = CUBE_FACES * CUBE_VERTICES_PER_FACE; -static const uint CUBE_VERTEX_POINTS = CUBE_VERTICES * FLOATS_PER_VERTEX; -static const uint CUBE_INDICES = CUBE_FACES * TRIANGLES_PER_QUAD * VERTICES_PER_TRIANGLE; -static const uint SPHERE_LATITUDES = 24; -static const uint SPHERE_MERIDIANS = SPHERE_LATITUDES * 2; -static const uint SPHERE_INDICES = SPHERE_MERIDIANS * (SPHERE_LATITUDES - 1) * TRIANGLES_PER_QUAD * VERTICES_PER_TRIANGLE; +static const int VERTICES_PER_TRIANGLE = 3; + +//static const uint FLOATS_PER_VERTEX = 3; +//static const uint TRIANGLES_PER_QUAD = 2; +//static const uint CUBE_FACES = 6; +//static const uint CUBE_VERTICES_PER_FACE = 4; +//static const uint CUBE_VERTICES = CUBE_FACES * CUBE_VERTICES_PER_FACE; +//static const uint CUBE_VERTEX_POINTS = CUBE_VERTICES * FLOATS_PER_VERTEX; +//static const uint CUBE_INDICES = CUBE_FACES * TRIANGLES_PER_QUAD * VERTICES_PER_TRIANGLE; +//static const uint SPHERE_LATITUDES = 24; +//static const uint SPHERE_MERIDIANS = SPHERE_LATITUDES * 2; +//static const uint SPHERE_INDICES = SPHERE_MERIDIANS * (SPHERE_LATITUDES - 1) * TRIANGLES_PER_QUAD * VERTICES_PER_TRIANGLE; static const gpu::Element POSITION_ELEMENT{ gpu::VEC3, gpu::FLOAT, gpu::XYZ }; static const gpu::Element NORMAL_ELEMENT{ gpu::VEC3, gpu::FLOAT, gpu::XYZ }; @@ -122,9 +123,9 @@ void GeometryCache::ShapeData::drawWireInstances(gpu::Batch& batch, size_t count } const VertexVector& icosahedronVertices() { - static const float phi = (1.0 + sqrt(5.0)) / 2.0; - static const float a = 0.5; - static const float b = 1.0 / (2.0 * phi); + static const float phi = (1.0 + sqrt(5.0f)) / 2.0f; + static const float a = 0.5f; + static const float b = 1.0f / (2.0f * phi); static const VertexVector vertices{ // vec3(0, b, -a), vec3(-b, a, 0), vec3(b, a, 0), // @@ -294,7 +295,6 @@ void GeometryCache::buildShapes() { static const size_t VERTEX_FORMAT_SIZE = 2; static const size_t VERTEX_OFFSET = 0; - static const size_t NORMAL_OFFSET = 1; for (size_t i = 0; i < vertices.size(); ++i) { auto vertexIndex = i;