/// <summary> /// Loads a vertex 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.PixelShader(XFG.PixelShader.FromStream(device, shaderStream)); } #else effect = new XFG.Effect(device, shaderCode); #endif }
/// <summary> /// Loads a vertex 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.PixelShader( XFG.PixelShader.FromStream( device, shaderStream ) ); } #else effect = new XFG.Effect( device, shaderCode ); #endif }