- GL::Renderer renderer(0);
- renderer.matrix_stack() *= GL::Matrix::translation(0, 0, -5);
- renderer.matrix_stack() *= GL::Matrix::rotation(angle/2.3, 0, 1, 0);
- renderer.matrix_stack() *= GL::Matrix::rotation(angle, 1, 0.25, 0);
- renderer.set_material(&material);
- renderer.set_texture(&texture);
- box.draw(renderer);
+ {
+ GL::Renderer renderer(0);
+ renderer.set_texture(&texture);
+ skybox.draw(renderer);
+ }
+ {
+ GL::Bind bind_light(lighting);
+ GL::Bind bind_depth(GL::DepthTest::lequal());
+ GL::Renderer renderer(0);
+ renderer.set_material(&material);
+ renderer.set_shader_program(&shprog, &shdata);
+ renderer.set_texture(&texture);
+ renderer.matrix_stack() *= GL::Matrix::translation(0, 0, -7);
+ {
+ GL::Renderer::Push _push(renderer);
+ renderer.matrix_stack() *= GL::Matrix::translation(-2, 0, 0);
+ renderer.matrix_stack() *= GL::Matrix::rotation(angle/2.3, 0, 1, 0);
+ renderer.matrix_stack() *= GL::Matrix::rotation(angle, 1, 0.25, 0);
+ box.draw(renderer);
+ }
+ {
+ GL::Renderer::Push _push(renderer);
+ renderer.matrix_stack() *= GL::Matrix::translation(2, 0, 0);
+ renderer.matrix_stack() *= GL::Matrix::rotation(-angle/2.3, 0, 1, 0);
+ renderer.matrix_stack() *= GL::Matrix::rotation(angle, 1, 0.25, 0);
+ cylinder.draw(renderer);
+ }
+ }