SaschaWillems / Vulkan

C++ examples for the Vulkan graphics API
MIT License
10.39k stars 2.04k forks source link

Bug issue (trianglevulkan13) #1167

Closed bioorg closed 1 hour ago

bioorg commented 7 hours ago

Hello, in trianglevulkan13.cpp

void createVertexBuffer() {

......

memcpy(data, vertices.data(), vertexBufferSize); memcpy(((char*)data) + vertexBufferSize, indices.data(), vertexBufferSize); <== this is the 249th line

This 249th line memcpy(((char)data) + vertexBufferSize, indices.data(), vertexBufferSize); should be memcpy(((char)data) + vertexBufferSize, indices.data(), indexBufferSize); <==indexBufferSize

Strangely, anyway, this trianglevulkan13 example runs all right without even a warning But this must be a bug, I guess

So please check this and update the source file if needed

Thank you