rework examples according to new changes
This commit is contained in:
@@ -42,6 +42,7 @@ namespace OpenVulkano
|
||||
std::vector<SimpleDrawable> drawablesPool;
|
||||
std::vector<Node> nodesPool;
|
||||
Vector3f_SIMD position = {0, 0, -10};
|
||||
std::vector<Geometry> m_geos;
|
||||
|
||||
OpenVulkano::Scene::UI::SimpleUi m_ui;
|
||||
std::shared_ptr<OpenVulkano::Scene::UI::PerformanceInfo> m_perfInfo;
|
||||
@@ -61,11 +62,14 @@ namespace OpenVulkano
|
||||
shader.AddShaderProgram(OpenVulkano::ShaderProgramType::FRAGMENT, "Shader/basic");
|
||||
shader.AddVertexInputDescription(OpenVulkano::Vertex::GetVertexInputDescription());
|
||||
drawablesPool.resize(GEOS);
|
||||
m_geos.reserve(GEOS);
|
||||
for (uint32_t i = 0; i < GEOS; i++)
|
||||
{
|
||||
Geometry* geo = GeometryFactory::MakeCube(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);
|
||||
m_geos.push_back(GeometryFactory::MakeCube(
|
||||
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, &m_geos[i], &mat);
|
||||
}
|
||||
nodesPool.resize(OBJECTS);
|
||||
for (uint32_t i = 0; i < OBJECTS; i++)
|
||||
|
||||
Reference in New Issue
Block a user