i try a gamesystem when i try change the gamestament the graphics of 3d model is very poor
and i don´t know how fix the problem
public World(Game game, Manager ola, string text)
: base(game)
{
NeoManager = ola;
texto = text;
System.Console.Write(texto);
// graphicsDeviceManager.PreferredGraphicsProfile = new FeatureLevel[] { FeatureLevel.Level_9_1, };
pointer = new PointerManager(game);
// this game system has something to draw - enable drawing by default
// this can be disabled to make objects drawn by this system disappear
Visible = true;
// this game system has logic that needs to be updated - enable update by default
// this can be disabled to simulate a "pause" in logic update
Enabled = true;
// add the system itself to the systems list, so that it will get initialized and processed properly
// this can be done after game initialization - the Game class supports adding and removing of game systems dynamically
Game.GameSystems.Add(this);
}
public override void Draw(GameTime gameTime)
{
NeoManager.BeginDraw(gameTime);the problem is where
GraphicsDevice.Clear(SharpDX.Color.CornflowerBlue);
model.Draw(GraphicsDevice, world, view, projection);
/////GraphicsDevice.DepthStencilState = DepthStencilState.Default;
//// device.Clear();
//// // Render the text
spriteBatch.Begin();
spriteBatch.DrawString(arial16BMFont, "Press the pointer to switch models...\r\nCurrent Model: " + model.Name, new Vector2(16, 16), Color.White);
////GraphicsDevice.Clear(Color.AntiqueWhite);
//// GraphicsDevice.SamplerStates.Default;
spriteBatch.End();
// GraphicsDevice.ClearState();
NeoManager.EndDraw();// problem is cause by this
base.Draw(gameTime);
}
public Gamer()
{
// Creates a graphics manager. This is mandatory.
graphicsDeviceManager = new GraphicsDeviceManager(this);
graphicsDeviceManager.PreferredBackBufferWidth = 1280;
graphicsDeviceManager.PreferredBackBufferHeight = 800;
NeoManager = new Manager(this);
IsMouseVisible = true;
// _Login.Visible = true;
// graphicsDeviceManager.IsFullScreen = true;
// graphicsDeviceManager.re
Content.RootDirectory = "Content";
world = new World (this,NeoManager,"sa");
}