Error operator()(CommandBufferImpl* commands) { GlState& state = commands->getManager().getImplementation(). getRenderingThread().getState(); if(state.m_blendSfunc != m_sfactor || state.m_blendDfunc != m_dfactor) { glBlendFunc(m_sfactor, m_dfactor); state.m_blendSfunc = m_sfactor; state.m_blendDfunc = m_dfactor; } return ErrorCode::NONE; }
Error operator()(CommandBufferImpl* commands) { GlState& state = commands->getManager().getImplementation(). getRenderingThread().getState(); if(state.m_viewport[0] != m_value[0] || state.m_viewport[1] != m_value[1] || state.m_viewport[2] != m_value[2] || state.m_viewport[3] != m_value[3]) { glViewport(m_value[0], m_value[1], m_value[2], m_value[3]); state.m_viewport = m_value; } return ErrorCode::NONE; }