MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / update_data_buffer

Method update_data_buffer

cube/cube.cpp:3047–3061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3045}
3046
3047void Demo::update_data_buffer(void *uniform_memory_ptr) {
3048 mat4x4 VP;
3049 mat4x4_mul(VP, projection_matrix, view_matrix);
3050
3051 // Rotate around the Y axis
3052 mat4x4 Model;
3053 mat4x4_dup(Model, model_matrix);
3054 mat4x4_rotate_Y(model_matrix, Model, static_cast<float>(degreesToRadians(spin_angle)));
3055 mat4x4_orthonormalize(model_matrix, model_matrix);
3056
3057 mat4x4 MVP;
3058 mat4x4_mul(MVP, VP, model_matrix);
3059
3060 memcpy(uniform_memory_ptr, (const void *)&MVP[0][0], sizeof(MVP));
3061}
3062
3063/* Convert ppm image data from header file into RGBA texture image */
3064#ifdef TEXTURE_PPM_H

Callers

nothing calls this directly

Calls 4

mat4x4_mulFunction · 0.85
mat4x4_dupFunction · 0.85
mat4x4_rotate_YFunction · 0.85
mat4x4_orthonormalizeFunction · 0.85

Tested by

no test coverage detected