Flag(glm::vec3 material_kd, glm::vec3 material_ks, float pole_length, float pole_width, float fabric_length, float fabric_width, unsigned int gl_program_shader_phong, unsigned int gl_program_shader_wave) { this->gl_program_shader_phong = gl_program_shader_phong; this->gl_program_shader_wave = gl_program_shader_wave; this->material_kd = material_kd; this->material_ks = material_ks; this->pole_length = pole_length; this->pole_width = pole_width; this->fabric_length = fabric_length; this->fabric_width = fabric_width; start = std::chrono::high_resolution_clock::now(); drawPole(); drawFabric(); }
void Asteroid::draw(){ glMatrixMode( GL_MODELVIEW ); // Setup model transformations glPushMatrix(); applyTrans(); drawPole(poles[0], xpos); drawPole(poles[1], ypos); drawPole(poles[2], xneg); drawPole(poles[3], yneg); drawPole(poles[4], zpos); drawPole(poles[5], zneg); glPopMatrix(); glFlush(); // Flush OpenGL queue }