bool renderer::begin_render(const color &_background, const rect &_viewport) { if (m_video.exists(m_viewport_ID)) { vo::viewport &l_viewport = m_video.get_<vo::viewport>(m_viewport_ID); l_viewport.set_clear_flags(cf::color); l_viewport.set_clear_color(_background); l_viewport.clear(); flash_vs::viewport.area = float4((float)_viewport.min().x, (float)_viewport.min().y, (float)_viewport.size().x, (float)_viewport.size().y); vo::memreader &l_memreader = m_video.get_<vo::memreader>(m_memreader_ID); l_memreader.clear(); } return true; }
constexpr bool operator==( rect< PositionType, SizeType > const& lhs, rect< PositionType, SizeType > const& rhs ){ return lhs.top_left() == rhs.top_left() && lhs.size() == rhs.size(); }