KhronosGroup / KhronosGroup/Vulkan-Tutorial

Assignment to perspectiveMatrix breaks const-correctness

Open Beginner friendly
#370 0 comments 0 reactions 0 assignees View on GitHub
Game Engine
Dominant language
C++
Stars
418
Forks
126
Avg merge
11d 6h
Merged PRs (30d)
31

Description

Hello,

I noticed three is a compile-time error when using the code at https://docs.vulkan.org/tutorial/latest/Building_a_Simple_Engine/Engine_Architecture/03_component_systems.html#:~:text=glm%3A%3Amat4,projectionMatrix%3B%20%7D

Assigning to perspectiveMatrix breaks const-correctness here which results in a compile error. I think just removing const specifier on this method fixes the problem as I get no compile-time error. If it's correct and I'm wrong don't hesitate to say so, but please explain me why.

Best regards,

ajvp

Contributor guide

Open the contributing guide

Research direction

Read the linked Vulkan Tutorial Engine Architecture page and inspect the example using perspectiveMatrix, including the const-qualified method. Compile the example to reproduce the const-correctness error, then update the documented code so it compiles without that error and verify the example still conveys the intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.