<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>MonoGame Discussions Rss Feed</title><link>http://monogame.codeplex.com/Thread/List.aspx</link><description>MonoGame Discussions Rss Description</description><item><title>New Post: Window Position</title><link>http://monogame.codeplex.com/discussions/444156</link><description>&lt;div style="line-height: normal;"&gt;Hi tomedison&lt;br /&gt;
I see in your profile that you recently joined Mpnogame &lt;br /&gt;
So i would suggest first to read first some tutos:&lt;br /&gt;
&lt;a href="https://monogame.codeplex.com/discussions/439595" rel="nofollow"&gt;List of Monogame tutorials&lt;/a&gt;&lt;br /&gt;
Peter&lt;br /&gt;
&lt;/div&gt;</description><author>Akenaton</author><pubDate>Sun, 19 May 2013 20:58:04 GMT</pubDate><guid isPermaLink="false">New Post: Window Position 20130519085804P</guid></item><item><title>New Post: Window Position</title><link>http://monogame.codeplex.com/discussions/444156</link><description>&lt;div style="line-height: normal;"&gt;Where have found Activity1 class?&lt;br /&gt;
&lt;/div&gt;</description><author>tomedison</author><pubDate>Sun, 19 May 2013 20:39:30 GMT</pubDate><guid isPermaLink="false">New Post: Window Position 20130519083930P</guid></item><item><title>New Post: Another shader issue...</title><link>http://monogame.codeplex.com/discussions/444217</link><description>&lt;div style="line-height: normal;"&gt;Ok, I dont get it.. Been staring at this for 2 days and can not figure out why I cant get this to work with monogame.. if I build this with Vis studio 2010, it works perfectly.. I can get it to display and work perfectly... I can even get it to build properly using the monogame content project for win8... but then I cant get it to display... I get a blank screen.. same code being used in both projects.. &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;sampler2D samplerState;  

//Width to sample from
float mag;

//Alpha value
float alpha;

float   dessatAmount; 

const float2 offsets[12] = {
   -0.326212, -0.405805,
   -0.840144, -0.073580,
   -0.695914,  0.457137,
   -0.203345,  0.620716,
    0.962340, -0.194983,
    0.473434, -0.480026,
    0.519456,  0.767022,
    0.185461, -0.893124,
    0.507431,  0.064425,
    0.896420,  0.412458,
   -0.321940, -0.932615,
   -0.791559, -0.597705,
};


struct PS_INPUT 
{ 
    float2 TexCoord : TEXCOORD0; 
}; 


float4 bloomEffect(PS_INPUT Input) : COLOR0 
{ 
    float4 sum = tex2D(samplerState, Input.TexCoord);
    float4 tex;
    
    //accumulate the color values from 12 neighboring pixels
    for(int i = 0; i &amp;lt; 12; i++)
    {
        tex = tex2D(samplerState, Input.TexCoord + mag * offsets[i]);
        sum += tex;
    }

    //average the sum
    sum /= 13;
    
    //fix alpha
    sum.a = alpha;
    
    float greyscale = dot(sum.rgb, float3(0.30, 0.59, 0.11));     
    sum.rgb         = lerp(greyscale, sum.rgb, dessatAmount); 

    return sum;
}



technique Bloom { 
    pass P0{ 
        PixelShader = compile ps_4_0_level_9_1 bloomEffect(); 
    } 
    
} &lt;/code&gt;&lt;/pre&gt;

Any ideas where this is going wrong or why it works fine in vs2010, but not under monogame and vs2012?&lt;br /&gt;
&lt;/div&gt;</description><author>cdxrd</author><pubDate>Sun, 19 May 2013 20:29:34 GMT</pubDate><guid isPermaLink="false">New Post: Another shader issue... 20130519082934P</guid></item><item><title>New Post: Window Position</title><link>http://monogame.codeplex.com/discussions/444156</link><description>&lt;div style="line-height: normal;"&gt;Maybe I didn't understood correct what is the problem, sorry.&lt;br /&gt;
You can then change a bit code in Activity1.cs&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;        base.OnCreate(bundle);
        Game1.Activity = this;
        var g = new Game1();
        FrameLayout fl = new FrameLayout(this);

        fl.AddView(g.Window);

&lt;/code&gt;&lt;/pre&gt;

then try to use g.Window.SetX and SetY to position it like you want.&lt;br /&gt;
&lt;/div&gt;</description><author>itafraji</author><pubDate>Sun, 19 May 2013 20:24:49 GMT</pubDate><guid isPermaLink="false">New Post: Window Position 20130519082449P</guid></item><item><title>New Post: Loading SpriteFont on iOS causes MonoGameGLException</title><link>http://monogame.codeplex.com/discussions/404006</link><description>&lt;div style="line-height: normal;"&gt;Thank's barnard666 but i have the same problem with andy font  (andy.spritefont)&lt;br /&gt;
I do not get problem with MenuHeader.spritfont which is :&lt;br /&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&amp;lt;FontName&amp;gt;Segoe UI&amp;lt;/FontName&amp;gt;&lt;br /&gt;
&amp;lt;Size&amp;gt;18&amp;lt;/Size&amp;gt;&lt;br /&gt;
&amp;lt;Spacing&amp;gt;0&amp;lt;/Spacing&amp;gt;&lt;br /&gt;
&amp;lt;UseKerning&amp;gt;true&amp;lt;/UseKerning&amp;gt;&lt;br /&gt;
&amp;lt;Style&amp;gt;Bold&amp;lt;/Style&amp;gt;&lt;br /&gt;
&lt;blockquote&gt;
Can you reproduce?&lt;br /&gt;
Peter&lt;br /&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;!--
Ce fichier contient la description xml de la police, et qui sera lue par XNA
Framework Content Pipeline. Suivez les commentaires pour personnaliser l’apparence
de la police dans le jeu et changer les caractères disponibles.

--&amp;gt;
&amp;lt;XnaContent xmlns:Graphics=&amp;quot;Microsoft.Xna.Framework.Content.Pipeline.Graphics&amp;quot;&amp;gt;
  &amp;lt;Asset Type=&amp;quot;Graphics:FontDescription&amp;quot;&amp;gt;

    &amp;lt;!--
    Modifiez cette chaîne pour modifier la police importée.
    --&amp;gt;
    &amp;lt;FontName&amp;gt;Andy&amp;lt;/FontName&amp;gt;

    &amp;lt;!--
    La taille de la valeur flottante, en points. Modifiez cette valeur pour changer
    la taille de la police.
    --&amp;gt;
    &amp;lt;Size&amp;gt;20&amp;lt;/Size&amp;gt;

    &amp;lt;!--
    Espace de la valeur flottante, en pixels. Modifiez cette valeur pour changer
    l’espacement entre les caractères.
    --&amp;gt;
    &amp;lt;Spacing&amp;gt;0&amp;lt;/Spacing&amp;gt;

    &amp;lt;!--
    UseKerning contrôle la présentation de la police. Si cette valeur est vraie, les informations de crénage
    sont utilisées lors du positionnement des caractères.
    --&amp;gt;
    &amp;lt;UseKerning&amp;gt;true&amp;lt;/UseKerning&amp;gt;

    &amp;lt;!--
    Style contrôle le style de la police. Les entrées valides sont Regular, Bold, Italic,
    et Bold Italic et respectent la casse.
    --&amp;gt;
    &amp;lt;Style&amp;gt;Bold&amp;lt;/Style&amp;gt;

    &amp;lt;!--
    Si vous supprimez le commentaire de cette ligne, le caractère par défaut est remplacé si vous dessinez
    ou mesurez du texte qui contient des caractères non compris dans la police.
    --&amp;gt;
    &amp;lt;!-- &amp;lt;DefaultCharacter&amp;gt;*&amp;lt;/DefaultCharacter&amp;gt; --&amp;gt;

    &amp;lt;!--
    CharacterRegions contrôle les lettres disponibles dans la police. Tous les
    caractères doivent être créés et disponibles pour le dessin. La plage
    par défaut va de 32 (espace ASCII) à 126 (~), couvrant le jeu de caractères Latin
    de base. Les caractères sont triés selon la norme Unicode.
    Pour plus d’informations, voir la documentation.
    --&amp;gt;
    &amp;lt;CharacterRegions&amp;gt;
      &amp;lt;CharacterRegion&amp;gt;
        &amp;lt;Start&amp;gt;&amp;amp;#32;&amp;lt;/Start&amp;gt;
        &amp;lt;End&amp;gt;&amp;amp;#126;&amp;lt;/End&amp;gt;
      &amp;lt;/CharacterRegion&amp;gt;
    &amp;lt;/CharacterRegions&amp;gt;
  &amp;lt;/Asset&amp;gt;
&amp;lt;/XnaContent&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>Akenaton</author><pubDate>Sun, 19 May 2013 19:40:09 GMT</pubDate><guid isPermaLink="false">New Post: Loading SpriteFont on iOS causes MonoGameGLException 20130519074009P</guid></item><item><title>New Post: Gerbil Physics available on Android</title><link>http://monogame.codeplex.com/discussions/444163</link><description>&lt;div style="line-height: normal;"&gt;Thanks Peter, yes that is Farseer you see there.  That part ported over to MonoGame with zero issues, it Just Worked :).&lt;br /&gt;
&lt;/div&gt;</description><author>Beringela</author><pubDate>Sun, 19 May 2013 19:36:23 GMT</pubDate><guid isPermaLink="false">New Post: Gerbil Physics available on Android 20130519073623P</guid></item><item><title>New Post: Share apk for feedback.</title><link>http://monogame.codeplex.com/discussions/444065</link><description>&lt;div style="line-height: normal;"&gt;Also, Google offer alpha and beta testing:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://support.google.com/googleplay/android-developer/answer/3131213?hl=en&amp;amp;ref_topic=2897459" rel="nofollow"&gt;https://support.google.com/googleplay/android-developer/answer/3131213?hl=en&amp;ref_topic=2897459&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
So you can publish it privately just to your testers&lt;br /&gt;
&lt;/div&gt;</description><author>Beringela</author><pubDate>Sun, 19 May 2013 19:34:52 GMT</pubDate><guid isPermaLink="false">New Post: Share apk for feedback. 20130519073452P</guid></item><item><title>New Post: Gerbil Physics available on Android</title><link>http://monogame.codeplex.com/discussions/444163</link><description>&lt;div style="line-height: normal;"&gt;Looks great&lt;br /&gt;
Are you using farseer Physics?&lt;br /&gt;
Peter&lt;br /&gt;
&lt;/div&gt;</description><author>Akenaton</author><pubDate>Sun, 19 May 2013 18:31:30 GMT</pubDate><guid isPermaLink="false">New Post: Gerbil Physics available on Android 20130519063130P</guid></item><item><title>New Post: Window Position</title><link>http://monogame.codeplex.com/discussions/444156</link><description>&lt;div style="line-height: normal;"&gt;Viewport won't change windows's position. Its for view in the window.&lt;br /&gt;
&lt;/div&gt;</description><author>tomedison</author><pubDate>Sun, 19 May 2013 17:38:54 GMT</pubDate><guid isPermaLink="false">New Post: Window Position 20130519053854P</guid></item><item><title>New Post: Unable to play Song</title><link>http://monogame.codeplex.com/discussions/443788</link><description>&lt;div style="line-height: normal;"&gt;Oh ok. How silly of me. Thanks!&lt;br /&gt;
&lt;/div&gt;</description><author>eshyong</author><pubDate>Sun, 19 May 2013 17:35:55 GMT</pubDate><guid isPermaLink="false">New Post: Unable to play Song 20130519053555P</guid></item><item><title>New Post: Window Position</title><link>http://monogame.codeplex.com/discussions/444156</link><description>&lt;div style="line-height: normal;"&gt;Ok then try to reset viewport. It is automaticaly set to match yor device screen based on width heigth and aspect ratio. Do it after initialze otherwise monogame will force it back to calculated values. It set it to fit vertically and calculate width by aspect ratio.&lt;br /&gt;
This leads to gap on the right side. Try to cteate your own vewport and set it to graphic device. Note that you have to reset it each time the screen size changed. I didn't manage to fix it so I use fullscreen.&lt;br /&gt;
&lt;/div&gt;</description><author>itafraji</author><pubDate>Sun, 19 May 2013 17:35:21 GMT</pubDate><guid isPermaLink="false">New Post: Window Position 20130519053521P</guid></item><item><title>New Post: Unable to play Song</title><link>http://monogame.codeplex.com/discussions/443788</link><description>&lt;div style="line-height: normal;"&gt;To load songs, just use an mp3. No content processing required here.&lt;br /&gt;
&lt;/div&gt;</description><author>Nezz</author><pubDate>Sun, 19 May 2013 14:32:16 GMT</pubDate><guid isPermaLink="false">New Post: Unable to play Song 20130519023216P</guid></item><item><title>New Post: Window Position</title><link>http://monogame.codeplex.com/discussions/444156</link><description>&lt;div style="line-height: normal;"&gt;but what if I don't want a full screen?&lt;br /&gt;
&lt;/div&gt;</description><author>tomedison</author><pubDate>Sun, 19 May 2013 14:19:14 GMT</pubDate><guid isPermaLink="false">New Post: Window Position 20130519021914P</guid></item><item><title>New Post: Content pipeline don't work :(</title><link>http://monogame.codeplex.com/discussions/444133</link><description>&lt;div style="line-height: normal;"&gt;Fix it! :)&lt;br /&gt;
&lt;br /&gt;
I use 2MGFX. Then load effect like here:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;BinaryReader Reader = new BinaryReader(File.Open(@&amp;quot;Content\\shaders\\myShader.mgfxo&amp;quot;, FileMode.Open)); 
myShader = new Effect(GraphicsDevice, Reader.ReadBytes((int)Reader.BaseStream.Length)); &lt;/code&gt;&lt;/pre&gt;

Maybe it will help some one too...&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;/div&gt;</description><author>dmitryhryppa</author><pubDate>Sun, 19 May 2013 14:06:53 GMT</pubDate><guid isPermaLink="false">New Post: Content pipeline don't work :( 20130519020653P</guid></item><item><title>New Post: Content pipeline don't work :(</title><link>http://monogame.codeplex.com/discussions/444133</link><description>&lt;div style="line-height: normal;"&gt;Yea, I did this.&lt;br /&gt;
And it says: &amp;quot;The MGFX file is corrupt!&amp;quot;... &lt;br /&gt;
&lt;br /&gt;
Note: I use OpenGL Monogame Project&lt;br /&gt;
&lt;/div&gt;</description><author>dmitryhryppa</author><pubDate>Sun, 19 May 2013 13:41:13 GMT</pubDate><guid isPermaLink="false">New Post: Content pipeline don't work :( 20130519014113P</guid></item><item><title>New Post: Content pipeline don't work :(</title><link>http://monogame.codeplex.com/discussions/444133</link><description>&lt;div style="line-height: normal;"&gt;You should&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;copy the myshader.xnb file to the Content folder of your MonoGame project&lt;/li&gt;
&lt;li&gt;set it to 'Content' and 'Copy if newer'&lt;/li&gt;
&lt;li&gt;Load it with the following code:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;    shaderEffect = Content.Load&amp;lt;Effect&amp;gt;(@&amp;quot;myshader&amp;quot;);
&lt;/code&gt;&lt;/pre&gt;

Stephan&lt;br /&gt;
 --&lt;br /&gt;
&lt;a href="http://www.software7.com" rel="nofollow"&gt;http://www.software7.com&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>stephan7</author><pubDate>Sun, 19 May 2013 13:37:46 GMT</pubDate><guid isPermaLink="false">New Post: Content pipeline don't work :( 20130519013746P</guid></item><item><title>New Post: Content pipeline don't work :(</title><link>http://monogame.codeplex.com/discussions/444133</link><description>&lt;div style="line-height: normal;"&gt;Here is what I'm do. 2 ways:&lt;br /&gt;
&lt;br /&gt;
1) Add mysahder.fx to content, and set the content processor to MonoGame Effect. &lt;br /&gt;
2) Build it. Have mysahder.xnb&lt;br /&gt;
3) Use 2MGFX tool:  &lt;strong&gt;2mgfx.exe myshader.xnb myshader.mgfx&lt;/strong&gt; &lt;br /&gt;
4) It says me: &amp;quot;The effect must contain at least one technique and pass.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Second way: &lt;br /&gt;
1) Use 2MGFX tool:  &lt;strong&gt;2mgfx.exe myshader.fx myshader.mgfx&lt;/strong&gt;&lt;br /&gt;
2) Add myshader.mgfx to content and set content processor as &amp;quot;MonoGame Effect&amp;quot;. &lt;br /&gt;
3) Try to compile. &lt;br /&gt;
4) It says me: &amp;quot;The effect must contain at least one technique and pass.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Not work :(&lt;br /&gt;
&lt;br /&gt;
I try to change &amp;quot;technique&amp;quot; to &amp;quot;Technique&amp;quot;, and &amp;quot;pass&amp;quot; to &amp;quot;Pass&amp;quot;. But it's not work too...&lt;br /&gt;
&lt;br /&gt;
if I compile myshader.fx, without 2MGFX, with MonoGame Effect processor it's work to create myshader.xnb&lt;br /&gt;
But if I tried to load it:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;_myShader= Commons.cContent.Load&amp;lt;Effect&amp;gt;(@&amp;quot;shaders/myshader&amp;quot;);&lt;/code&gt;&lt;/pre&gt;

It says: The MGFX file is corrupt&lt;br /&gt;
&lt;/div&gt;</description><author>dmitryhryppa</author><pubDate>Sun, 19 May 2013 13:27:59 GMT</pubDate><guid isPermaLink="false">New Post: Content pipeline don't work :( 20130519012759P</guid></item><item><title>New Post: Content pipeline don't work :(</title><link>http://monogame.codeplex.com/discussions/444133</link><description>&lt;div style="line-height: normal;"&gt;How do you load the effect file (.xnb)?&lt;br /&gt;
&lt;/div&gt;</description><author>stephan7</author><pubDate>Sun, 19 May 2013 13:20:08 GMT</pubDate><guid isPermaLink="false">New Post: Content pipeline don't work :( 20130519012008P</guid></item><item><title>New Post: Unable to create monogame android project in visual studio 2010 ultimate</title><link>http://monogame.codeplex.com/discussions/444172</link><description>&lt;div style="line-height: normal;"&gt;
&lt;div dir="ltr"&gt;MonoGame itself is free, but requires a .NET environment on Android. Xamarin provide the .NET development environment for Android.&lt;/div&gt;
&lt;/div&gt;</description><author>slygamer</author><pubDate>Sun, 19 May 2013 12:55:16 GMT</pubDate><guid isPermaLink="false">New Post: Unable to create monogame android project in visual studio 2010 ultimate 20130519125516P</guid></item><item><title>New Post: Content pipeline don't work :(</title><link>http://monogame.codeplex.com/discussions/444133</link><description>&lt;div style="line-height: normal;"&gt;Thank you! Now it works. &lt;br /&gt;
But I have new problem :) With shaders.&lt;br /&gt;
&lt;br /&gt;
I was compile shader like here: &lt;a href="http://www.software7.com/blog/custom-shaders-on-windows-phone-8/" rel="nofollow"&gt;http://www.software7.com/blog/custom-shaders-on-windows-phone-8/&lt;/a&gt; &lt;br /&gt;
And all looks like OK. It make the myshader.xnb for me.&lt;br /&gt;
&lt;br /&gt;
When I try to load the Effect, I get an exception saying &lt;strong&gt;The MGFX file is corrupt&lt;/strong&gt;  in MonoGame. The header should be MGFX but it's a seemingly random byte array.&lt;br /&gt;
&lt;br /&gt;
Then I try to use a tool named &lt;strong&gt;2MGFX&lt;/strong&gt;. I tried this, but the tool reports: __The effect must contain at least one technique and pass. __ From what I can see from myshader.fx the file, it does.&lt;br /&gt;
&lt;br /&gt;
Here is my shader:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;sampler TextureSampler : register(s0);
float _valueAlpha = 1;
float _valueRGB = 1;

float4 main(float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
    // Look up the texture color.
    float4 tex = tex2D(TextureSampler, texCoord);
    
    // Convert it to greyscale. The constants 0.3, 0.59, and 0.11 are because
    // the human eye is more sensitive to green light, and less to blue.
    float greyscale = dot(tex.rgb, float3(0.3, 0.59, 0.11));
    
    // The input color alpha controls saturation level.
    tex.rgb = lerp(greyscale, tex.rgb *_valueRGB, color.a *_valueAlpha);
    
    return tex;
}


technique Technique1
{
    pass Pass1
    {
        PixelShader = compile ps_3_0 main();
    }
}&lt;/code&gt;&lt;/pre&gt;

So, how to use shaders in the monogame? :) &lt;br /&gt;
&lt;/div&gt;</description><author>dmitryhryppa</author><pubDate>Sun, 19 May 2013 12:20:17 GMT</pubDate><guid isPermaLink="false">New Post: Content pipeline don't work :( 20130519122017P</guid></item></channel></rss>