xna

XNA on graphics card

倾然丶 夕夏残阳落幕 提交于 2019-12-08 19:20:31
How can I program graphics on a graphics card with XNA? (How do I move the workload onto the graphics card) Explained in a very simplified way: All of the graphics are automatically drawn by the graphics card. There is no software rendererer mode in XNA. The way XNA is set up most geometry is transferred to the graphics card Vertex Buffer Objects. A fixed pipeline approximization or shaders are then applied to the data by the graphics card and displayed on screen. In short: If you want to do operations on your data while it's on the graphics card. Use vertex and pixel shaders. EDIT: You should

How to use XNA in WPF?

こ雲淡風輕ζ 提交于 2019-12-08 17:21:03
问题 So... I want to make a game, and I want to write it in C#. In the past, I've made a mario clone using C++ and OpenGL. I quite like OpenGL, but I don't know how well it's supported inside C#/WPF. Also, it might be beneficial to use an actual game library? I guess XNA is the game library for C#, so maybe I'll invest a bit of time learning that. However, I want to use WPF form controls for my level editor... is there any way that I can embed an XNA (DirectX?) window inside a WPF app?

XNA game distribution questions

不想你离开。 提交于 2019-12-08 16:30:53
问题 I want to start on a 2D game using C#, so I'm checking out my options. XNA sounds good, but a few points are not very clear to me. If I use XNA, can I just build my game and distribute my game as a standalone executable from my website ? Or are there any catches ? Do people need special libraries to play my game ? Do I have to pay MS to be able to distribute my game ? Normally I'll write a program, build it, put the executable up for download and presto, anybody can download, install and use

Adding content in MonoGame

南笙酒味 提交于 2019-12-08 13:30:53
问题 I'm new to Monogame. I'm trying to add content (An image), but I can't do this. In each tutorial that I have seen, the solution explorer has a folder where I can put assets, but not mine. I tried to add an image to the root folder, but it doesn't work. hero = Content.Load<Texture2D>(@"Image1.png"); 回答1: Right click on your solution and click Add , then New Project . From there, select Installed > Visual C# > Monogame , and click on the MonoGame Content Project After you do this, you will see

Are SpriteBatch drawcalls culled by XNA?

我是研究僧i 提交于 2019-12-08 10:42:34
问题 I have a very subtle problem with XNA, specifically the SpriteBatch. In my game I have a Camera class. It can Translate the view (obviously) and also zoom in and out. I apply the Camera to the scene when I call the "Begin" function of my spritebatch instance (the last parameter). The Problem: When the cameras Zoomfactor is bigger than 1.0f, the spritebatch stops drawing. I tried to debug my scene but I couldn't find the point where it goes wrong. I tried to just render with "Matrix

Farseer Meter/Pixel Ratio

心不动则不痛 提交于 2019-12-08 10:26:47
问题 I've done a lot with box2d in c++, and am giving C# a try. It looks like Farseer is generally used in place of Box2D (I'm aware of Box2DXNA, but it seems a little outdated.) So, Farseer is what I've been using. When I was using C++ and Box2D, everyone always advised against using a 1pixel/meter ratio (For what reason, I don't know,) and usually suggested using somewhere around 30pixels/meter. As I've been researching Farseer, I've seen a lot of conflicting statements. Some say to use 1pixel

C# XNA Xbox, in this case optional parameters are not optional

雨燕双飞 提交于 2019-12-08 10:06:26
问题 Apparently optional parameters won't work in C# Xna when used on the Xbox, there non suportedness is stated during compilation. I have a situation like this: func(float? a = null, int? b = null) With large numbers of thease optional parameters that default to the "undefined" value, null. This situation is required. In the simplified example above this can be unwrapped, although this isn't as optional parameters allow: func() func(float? a) func(int? b) func(float? a, int? b) However with

Camera rotation aligned to arbitrary plane

可紊 提交于 2019-12-08 08:24:25
问题 I have what I think is a fairly simple scenario for a camera, but my caveman brain refuses to think in anything more than two dimensions. My 3D camera needs to be aligned behind an object. This object can stick to any surface, and thus the camera's idea of what "up" is can be any arbitrary vector. It's very similar to this question, but since I'm not directly controlling the 'player' object and am instead trying to use CreateLookAt, I'm having trouble making sense of the solution: How can I

XNA SpriteBatch causing problems with BasicEffect

无人久伴 提交于 2019-12-08 07:22:57
问题 I'm using XNA to visualize some data, and I'm trying to use billboards for data, and spritebatch for HUD text drawing. For the billboards, I'm using the following example, which works great: http://create.msdn.com/en-US/education/catalog/sample/3d_audio In that example, there is a cat and dog sprite, where the cat passes in front of or behind the dog, depending on their positions and the camera position as you'd expect. It doesn't matter what order Cat.Draw and Dog.Draw are called in. These

XNA to render 3D video (fixed FPS!)

我们两清 提交于 2019-12-08 06:02:10
问题 i have to develop an application in wich the final step is to export a video (or a single frame) of a 3D animation generated by my software calculating the user input parameters. I want to use XNA and for this. i need that the software can export FIXED FPS video (or also all single frames of the video separately). It's not a matter the LIVE FPS. I don't need to view on the screen the frames at a fixed fps. As the animation could be very complex, i could accept if the software take 1 minute