Exemplo n.º 1
0
        }   // end of UIGridModularMenu RefreshTexture()

        public void Render(Camera camera)
        {
            try
            {
                ShaderGlobals.SetValues(effect);
                ShaderGlobals.SetCamera(effect, camera);

                effect.CurrentTechnique = effect.Techniques["NormalMappedWithEnv"];
                effect.Parameters["DiffuseTexture"].SetValue(diffuse);

                effect.Parameters["WorldMatrix"].SetValue(worldMatrix);
                effect.Parameters["WorldViewProjMatrix"].SetValue(worldMatrix * camera.ViewProjectionMatrix);

                effect.Parameters["Alpha"].SetValue(1.0f);
                effect.Parameters["DiffuseColor"].SetValue(new Vector4(1, 1, 1, 1));
                effect.Parameters["SpecularColor"].SetValue(specularColor);
                effect.Parameters["SpecularPower"].SetValue(specularPower);

                effect.Parameters["NormalMap"].SetValue(normalMap);

                geometry.Render(effect);
            }
            catch
            {
                // This Try/Catch is here since the first frame back from a device reset
                // the call to diffuse fails saying that the rendertarget is
                // still set on the device.  As far as I can tell it's not but I still
                // can't win the argument.
            }
        }   // end of UIGridModularMenu Render()
Exemplo n.º 2
0
        public void Render()
        {
            ///  render entire pie
            if (Active)
            {
                ShaderGlobals.SetValues(effect);
                ShaderGlobals.SetCamera(effect, camera);

                RenderDisk(rootDisk);
            }
        }