VulkanSDK 1.2.182.0
Visual Studio 2015
GLM: 0.9.6.3 (note that glm is missing from the example, I have to extract the glm zip file and put the glm folder to the folder named “external” in the example)
Vulkan C++ examples and demos
GitHub - SaschaWillems/Vulkan: Examples and demos for the new Vulkan API
That Vulkan example above is extremely rich for learning purpose but I cannot compile it. The errors are indicated in the code very below.
If anyone can help me, thanks. It’s a very rich Vulkan example.
---------- File: gltfloading.cpp in GLM project ----------
// Append data to model's vertex buffer
for (size_t v = 0; v < vertexCount; v++) {
Vertex vert{};
vert.pos = glm::vec4(glm::make_vec3(&positionBuffer[v * 3]), 1.0f);
Error C2679 binary '=': no operator found which takes a right-hand operand of type 'glm::tvec4<float,0>' (or there is no acceptable conversion)
vert.normal = glm::normalize(glm::vec3(normalsBuffer ? glm::make_vec3(&normalsBuffer[v * 3]) : glm::vec3(0.0f)));
vert.uv = texCoordsBuffer ? glm::make_vec2(&texCoordsBuffer[v * 2]) : glm::vec3(0.0f);
Error C2446 ':': no conversion from 'glm::tvec3<float,0>' to 'glm::tvec2<float,0>'
vert.color = glm::vec3(1.0f);
vertexBuffer.push_back(vert);
}
---------- File: type_vec3.hpp in GLM project ----------
namespace glm
{
template <typename T, precision P = defaultp>
struct tvec3
{
...
GLM_FUNC_DECL tvec3();
GLM_FUNC_DECL tvec3(tvec3<T, P> const & v);
...
//**** EDIT by me: Example of how I'm trying to fix the problem, not a permanent fix ****
GLM_FUNC_DECL tvec3(tvec3<T, P> const & v, T const & c)
{
this->x = v.x;
this->y = v.y;
this->z = v.z;
}
// But it doen't work.
...
}
}