예제 #1
0
        public override RenderMaterial CreateRenderMaterial(DefaultShaderType shaderType)
        {
            if (shaderType == DefaultShaderType.Textured)
            {
                return(new RenderMaterial(d_shaderWrapperTextured));
            }

            if (shaderType == DefaultShaderType.Solid)
            {
                return(new RenderMaterial(d_shaderWrapperSolid));
            }

            throw new InvalidOperationException("A default shader of this type does not exist.");
        }
예제 #2
0
        public GenericEffect(DefaultShaderType type)
            : this()
        {
            if (type != DefaultShaderType.Determine)
            {
                if (type == DefaultShaderType.Basic)
                {
                    mBasicEffect = new BasicEffect(FlatRedBallServices.GraphicsDevice);
                }

                else if (type == DefaultShaderType.AlphaTest)
                {
                    mAlphaTestEffect = new AlphaTestEffect(FlatRedBallServices.GraphicsDevice);
                }

                else if (type == DefaultShaderType.DualTexture)
                {
#if MONOGAME
                    throw new NotImplementedException();
#else
                    mDualTextureEffect = new DualTextureEffect(FlatRedBallServices.GraphicsDevice);
#endif
                }

                else if (type == DefaultShaderType.EnvironmentMapped)
                {
#if MONOGAME
                    throw new NotImplementedException();
#else
                    mEnvironmentMapEffect = new EnvironmentMapEffect(FlatRedBallServices.GraphicsDevice);
#endif
                }

                else if (type == DefaultShaderType.Skinned)
                {
#if MONOGAME
                    throw new NotImplementedException();
#else
                    mSkinnedEffect = new SkinnedEffect(FlatRedBallServices.GraphicsDevice);
#endif
                }
            }
        }
예제 #3
0
 /// <summary>
 /// Creates a copy of the specified default shader type.
 /// </summary>
 /// <param name="shaderType">
 /// Specifies the type of CEGUI shader that the RenderMaterial should be based on
 /// </param>
 /// <returns>
 /// A copy of the specified default shader type.
 /// </returns>
 public abstract /*RefCounted<RenderMaterial>*/ RenderMaterial CreateRenderMaterial(DefaultShaderType shaderType);
예제 #4
0
        public GenericEffect( DefaultShaderType type )
            :this()
        {
            if( type != DefaultShaderType.Determine )
            {
                if( type == DefaultShaderType.Basic )
                {
                    mBasicEffect = new BasicEffect( FlatRedBallServices.GraphicsDevice );
                }

                else if (type == DefaultShaderType.AlphaTest)
                {
                    mAlphaTestEffect = new AlphaTestEffect(FlatRedBallServices.GraphicsDevice);
                }

                else if (type == DefaultShaderType.DualTexture)
                {
#if MONOGAME
                    throw new NotImplementedException();
#else
                    mDualTextureEffect = new DualTextureEffect(FlatRedBallServices.GraphicsDevice);
#endif
                }

                else if (type == DefaultShaderType.EnvironmentMapped)
                {
#if MONOGAME
                    throw new NotImplementedException();
#else
                    mEnvironmentMapEffect = new EnvironmentMapEffect(FlatRedBallServices.GraphicsDevice);
#endif
                }

                else if (type == DefaultShaderType.Skinned)
                {
#if MONOGAME
                    throw new NotImplementedException();
#else
                    mSkinnedEffect = new SkinnedEffect(FlatRedBallServices.GraphicsDevice);
#endif
                }
            }
        }