00001 // /////////////////////////////////////////////////////////////////////////// 00002 // xrb_rendercontext.cpp by Victor Dods, created 2005/02/07 00003 // /////////////////////////////////////////////////////////////////////////// 00004 // Unless a different license was explicitly granted in writing by the 00005 // copyright holder (Victor Dods), this software is freely distributable under 00006 // the terms of the GNU General Public License, version 2. Any works deriving 00007 // from this work must also be released under the GNU GPL. See the included 00008 // file LICENSE for details. 00009 // /////////////////////////////////////////////////////////////////////////// 00010 00011 #include "xrb_rendercontext.hpp" 00012 00013 #include "xrb_gl.hpp" 00014 00015 namespace Xrb 00016 { 00017 00018 bool RenderContext::MaskAndBiasWouldResultInNoOp () const 00019 { 00020 return m_color_bias[Dim::A] == 0.0f && m_color_mask[Dim::A] == 0.0f; 00021 } 00022 00023 bool RenderContext::MaskAndBiasWouldResultInNoOp (ColorCoord color_alpha_channel_value) const 00024 { 00025 return m_color_bias[Dim::A] == 0.0f && (m_color_mask[Dim::A] == 0.0f || color_alpha_channel_value == 0.0f); 00026 } 00027 00028 void RenderContext::SetupGLClipRect () const 00029 { 00030 GL::SetClipRect(m_clip_rect); 00031 } 00032 00033 } // end of namespace Xrb