Type conversion, Code cleanup
Fixes compiler warnings
This commit is contained in:
parent
4561f05cf0
commit
24a13f18dc
20 changed files with 263045 additions and 5 deletions
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* See readme.md for details
|
||||
*
|
||||
* Copyright (C) 2016 by Sascha Willems - www.saschawillems.de
|
||||
* Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
|
||||
*
|
||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||
*/
|
||||
|
|
@ -42,7 +42,7 @@ void VulkanGear::generate(GearInfo *gearinfo, VkQueue queue)
|
|||
std::vector<Vertex> vBuffer;
|
||||
std::vector<uint32_t> iBuffer;
|
||||
|
||||
int i, j;
|
||||
int i;
|
||||
float r0, r1, r2;
|
||||
float ta, da;
|
||||
float u1, v1, u2, v2, len;
|
||||
|
|
@ -53,13 +53,13 @@ void VulkanGear::generate(GearInfo *gearinfo, VkQueue queue)
|
|||
r0 = gearinfo->innerRadius;
|
||||
r1 = gearinfo->outerRadius - gearinfo->toothDepth / 2.0f;
|
||||
r2 = gearinfo->outerRadius + gearinfo->toothDepth / 2.0f;
|
||||
da = 2.0f * M_PI / gearinfo->numTeeth / 4.0f;
|
||||
da = static_cast < float>(2.0 * M_PI / gearinfo->numTeeth / 4.0);
|
||||
|
||||
glm::vec3 normal;
|
||||
|
||||
for (i = 0; i < gearinfo->numTeeth; i++)
|
||||
{
|
||||
ta = i * 2.0f * M_PI / gearinfo->numTeeth;
|
||||
ta = i * static_cast <float>(2.0 * M_PI / gearinfo->numTeeth);
|
||||
|
||||
cos_ta = cos(ta);
|
||||
cos_ta_1da = cos(ta + da);
|
||||
|
|
@ -251,7 +251,7 @@ void VulkanGear::generate(GearInfo *gearinfo, VkQueue queue)
|
|||
iBuffer.data());
|
||||
}
|
||||
|
||||
indexCount = iBuffer.size();
|
||||
indexCount = static_cast<uint32_t>(iBuffer.size());
|
||||
|
||||
prepareUniformBuffer();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue