Exemple #1
0
        /// <summary>
        ///     Loads a pixel shader from shaderCode member variable
        /// </summary>
        protected override void LoadFromShaderCode()
        {
#if SILVERLIGHT
            using (var shaderStream = new MemoryStream())
            {
                shaderStream.Write(shaderCode, 0, shaderCode.Length);
                effect = new XFG.Effect();
                effect.VertexShader(XFG.VertexShader.FromStream(device, shaderStream));
            }
#else
            effect = new XFG.Effect(device, shaderCode);
#endif
        }
Exemple #2
0
        /// <summary>
        ///     Loads a pixel shader from shaderCode member variable
        /// </summary>
        protected override void LoadFromShaderCode()
        {
#if SILVERLIGHT
            using (var shaderStream = new MemoryStream())
            {
                shaderStream.Write(shaderCode, 0, shaderCode.Length);
				effect = new XFG.Effect();
                effect.VertexShader( XFG.VertexShader.FromStream( device, shaderStream ) );
            }
#else
			effect = new XFG.Effect( device, shaderCode );
#endif
        }