Interfacing XNA
we are trying (for fun mostly) to interface XNA (we did DX9 as well). The problem is that a device is created with an associated Game class, where we use our own structure. Is there a way to avoid this? We are mostly doing this so we can publish something on the xbox market place someday.
This has been working quite well for me:
Unless I'm misunderstanding your question.
var presentParams = new PresentationParameters(); presentParams.BackBufferWidth = RenderPanel.ClientSize.Width; presentParams.BackBufferHeight = RenderPanel.ClientSize.Height; presentParams.BackBufferFormat = SurfaceFormat.Unknown; presentParams.BackBufferCount = 1; presentParams.AutoDepthStencilFormat = DepthFormat.Depth24Stencil8; presentParams.EnableAutoDepthStencil = true; presentParams.IsFullScreen = false; presentParams.SwapEffect = SwapEffect.Discard; Device = new GraphicsDevice(adapter, DeviceType.Hardware, RenderPanel.Handle, presentParams);
Unless I'm misunderstanding your question.
omg thats what i hate about xna it hides everything with fancy stuff :) there's a simple graphicsDevice thanks.
Quote:Original post by FeverGamesIt doesn't hide it, per se. The developers simply realized that 90% or more of their audience would not want anything to do with handling the graphics device or run loop, so they created the Game class to encapsulate that. You're free to replace that class with your own implementation if you want. You can use MSDN to see all the docs about XNA and use Reflector to peer into the Game class if you want to see how they did something in there, then take all that knowledge and make your own version of the Game class.
omg thats what i hate about xna it hides everything with fancy stuff :) there's a simple graphicsDevice thanks.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement