static VALUE Drawable_get_color(VALUE vSelf) { // Get C++ object pointer from vSelf Drawable *pSelf; Data_Get_Struct(vSelf, Drawable, pSelf); DECLARE_OBJ_VAR(Color, Color, pSelf->GetColor()); return vColor; }
void RenderInputScene::SetFlags(const Drawable & d, GraphicsState & glstate) { glstate.DepthOffset(d.GetDecal()); if (d.GetCull()) { glstate.CullFace(true); if (d.GetCullFront()) glstate.CullFaceMode(GL_FRONT); else glstate.CullFaceMode(GL_BACK); } else { glstate.CullFace(false); } const Vec4 & color = d.GetColor(); glstate.SetColor(color[0], color[1], color[2], color[3]); }