void AAX_CEffectGUI_IPLUG::CreateViewContents() { TRACE; IGraphics* gui = ((IPlugAAX*) GetEffectParameters())->GetGUI(); if (gui) { mGraphics = gui; } else { mGraphics = 0; } }
//----------------------------------------------------------------------------- // Purpose: Draws the effect sprite, given an effect parameter ID //----------------------------------------------------------------------------- void C_WeaponPortalgun::DrawEffectSprite( EffectType_t effectID, bool b3rdPerson ) { color32 color; float scale; IMaterial *pMaterial; Vector vecAttachment; // Don't draw invisible effects if ( !IsEffectVisible( effectID, b3rdPerson ) ) return; // Get all of our parameters GetEffectParameters( effectID, color, scale, &pMaterial, vecAttachment, b3rdPerson ); // Don't render fully translucent objects if ( color.a <= 0.0f ) return; // Draw the sprite CMatRenderContextPtr pRenderContext( materials ); pRenderContext->Bind( pMaterial, this ); DrawSprite( vecAttachment, scale, scale, color ); }