fix push_back

This commit is contained in:
s473621 2024-03-04 19:36:46 +01:00
parent 1d263b5887
commit bdcd7163be

View File

@ -255,7 +255,7 @@ PlanetParams populatePlanet(PlanetParams planet, std::vector<Plant::Plant> plant
PlanetParams populatePlanetInstancingDemo(PlanetParams planet, std::vector<Plant::Plant> plants)
{
int HOW_MANY_PLANTS = 1000;
int HOW_MANY_PLANTS = 100;
int eachSpecie = int(HOW_MANY_PLANTS / plant_specimens.size());
for (int i = 0; i < plant_specimens.size(); i++)
@ -927,11 +927,11 @@ void init(GLFWwindow* window)
for (int i = 1; i <= 35; ++i) {
std::string plant_name = "testPlant" + std::to_string(i);
std::string model_name = "./models/roslina" + std::to_string(i)+".obj";
double random_value = static_cast<double>(rand()) / RAND_MAX;
std::cout << random_value;
//plant_specimens.push_back(Plant::Plant(1, random_value, 1, 1, plant_name, model_name));
}
int random_value_1 = rand() % 101;
int random_value_2 = rand() % 11;
plant_specimens.push_back(Plant::Plant(random_value_1, random_value_2, random_value_1, random_value_2, plant_name, model_name, plant2_1Material));
}
defaultTexture = Core::LoadTexture("textures/1.png");
if (defaultTexture == 0) {
std::cout << "Failed to load default texture" << std::endl;