1
votes

I have winforms application and i have texture SimpleTexture.xnb compiled as HiDef. I need to run XNA 3D visualisation from my winforms application in separate window. I try this:

    private void button1_Click(object sender, EventArgs e)
    {
        System.Threading.Thread thStartGame = new System.Threading.Thread(StartGame);
        thStartGame.Start();
    }

    private void StartGame()
    {
        using (Game1 game = new Game1())
        {
            game.Run();
        }
    }

But i get error: Error loading "SimpleTexture". This file was compiled for the HiDef profile, and cannot be loaded into a Reach GraphicsDevice.

What can i do to run this??

1

1 Answers

1
votes

Change reach to hidef:

YourGraphicsDeviceManager.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs (graphics_PreparingDeviceSettings);

void graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
{
   e.GraphicsDeviceInformation.GraphicsProfile = GraphicsProfile.HiDef;
}