Fix issues with ui rendering

This commit is contained in:
2023-09-08 18:17:16 +02:00
parent 2bcea0d7fd
commit 703f5c0d12
12 changed files with 43 additions and 50 deletions

View File

@@ -57,14 +57,14 @@ public:
shader.AddShaderProgram(openVulkanoCpp::ShaderProgramType::FRAGMENT, "Shader/basic");
shader.AddVertexInputDescription(openVulkanoCpp::Vertex::GetVertexInputDescription());
drawablesPool.resize(GEOS);
for(int i = 0; i < GEOS; i++)
for(uint32_t i = 0; i < GEOS; i++)
{
Geometry* geo = new Geometry();
geo->InitCube(std::rand() % 1000 / 1000.0f + 0.01f, std::rand() % 1000 / 1000.0f + 0.01f, std::rand() % 1000 / 1000.0f + 0.01f, Vector4f((std::rand() % 255) / 255.0f, (std::rand() % 255) / 255.0f, (std::rand() % 255) / 255.0f, 1));
drawablesPool[i].Init(&shader, geo, &mat);
}
nodesPool.resize(OBJECTS);
for(int i = 0; i < OBJECTS; i++)
for(uint32_t i = 0; i < OBJECTS; i++)
{
nodesPool[i].Init();
scene.GetRoot()->AddChild(&nodesPool[i]);
@@ -81,7 +81,7 @@ public:
void Tick() override
{
for(int i = 0; i < DYNAMIC; i++)
for(uint32_t i = 0; i < DYNAMIC; i++)
{
nodesPool[i].SetMatrix(glm::translate(glm::mat4x4(1), glm::vec3((std::rand() % 10000) / 1000.0f - 5, (std::rand() % 10000) / 1000.0f - 5, (std::rand() % 10000) / 1000.0f - 5)));
}