mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Increased size of unique identifier of objects: using uint64 instead of
int. Deep change in all concerned objects (Node, Source, Shader, etc.). No behavior change, just more robust in duration.
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <ctime>
|
||||
int GlmToolkit::uniqueId()
|
||||
uint64_t GlmToolkit::uniqueId()
|
||||
{
|
||||
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
|
||||
return std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count() % 1000000000;
|
||||
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch(); // 18446744073709551615
|
||||
return std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count() % 1000000000000000000LL;
|
||||
}
|
||||
|
||||
glm::mat4 GlmToolkit::transform(glm::vec3 translation, glm::vec3 rotation, glm::vec3 scale)
|
||||
|
||||
Reference in New Issue
Block a user