Esempio n. 1
0
        /// <summary>
        /// Loads all resources of the object.
        /// </summary>
        public override void LoadResources(EngineDevice device, ResourceDictionary resourceDictionary)
        {
            TexturePainterHelper newHelper = new TexturePainterHelper(m_resTexture);

            m_texturePainterHelpers.AddObject(
                newHelper,
                device.DeviceIndex);

            newHelper.LoadResources(resourceDictionary);
        }
Esempio n. 2
0
        /// <summary>
        /// Renders the object.
        /// </summary>
        /// <param name="renderState">Current render state.</param>
        private void OnRenderTransparent(RenderState renderState)
        {
            if (m_opacity < 1f)
            {
                // Get and configure helper object
                TexturePainterHelper actHelper = m_texturePainterHelpers[renderState.DeviceIndex];
                actHelper.Scaling            = m_scaling;
                actHelper.Opacity            = m_opacity;
                actHelper.AccentuationFactor = m_accentuationFactor;
                actHelper.AlphaBlendMode     = m_alphaMode;

                // Render the object
                actHelper.RenderPlain(renderState);
            }
        }