void application_window::display(const gl::render_context_ptr& context) { using namespace scm::gl; using namespace scm::math; { // image rendering pass context_program_guard cpg(context); context_state_objects_guard csg(context); context_texture_units_guard ctg(context); context_uniform_buffer_guard cug(context); context_atomic_counter_buffer_guard acg(context); context_image_units_guard cig(context); _atomic_test_prog->uniform("screen_res", vec2f(_viewport_size)); context->bind_atomic_counter_buffer(_atomic_counter, 0); context->bind_uniform_buffer(_camera_block->block().block_buffer(), 0); context->bind_program(_atomic_test_prog); context->set_rasterizer_state(_rstate_cback); context->set_depth_stencil_state(_dstate_less); context->set_blend_state(_bstate_off); _model_geometry->draw_raw(context, geometry::MODE_SOLID); } }