0
votes
1answer
62 views

XNA 4: RenderTarget2D textures getting transparent on fullscreen

I'm generating a Texture2D object using RenderTarget2D as in the following code public static Texture2D GetTextTexture(string text, Vector2 position, SpriteFont font, Color foreColor, Color ...
0
votes
1answer
52 views

Applying textures to 3D models

I want to apply textures to a 3D Model in XNA 4. Whatever I saw on the internet was to apply the textures in the modeling tool and then load the model (*.fbx) into XNA. Is it possible to load the ...
0
votes
0answers
20 views

XNA alpha channel mask

I'm trying to highlight a portion of the screen, such that the entire screen is covered with a semi-transparent black mask but part of that mask is "cut out", kind of like it's being lit up while ...
0
votes
0answers
42 views

XNA 4.0 displaying .fbx texture problem

Here is my image. I have Steve from MineCraft I exported it to .FBX format. After Googling for a while, I changed sampling mode to PointClamp and turned off anti-aliasing, but somehow the texture ...
5
votes
1answer
292 views

How can I draw a perspective-correct quad?

I'm trying to draw a quad in 2D (in SharpDX, but that is basically XNA). But texture correction is not working, and I'm getting only an affine textured quad. I'm using BasicEffect to render it. ...
8
votes
2answers
576 views

What are some ways to texture map a terrain?

I'm working with XNA on a 3D Game, and I'm trying to have a proper and nice environnement. I actually followed a tutorial to create a terrain from a heightmap. To texture it, I just apply a grass ...
2
votes
1answer
115 views

What's the difference between Textures and VertexTextures in XNA?

The GraphicsDevice class of XNA has the properties Textures and VertexTextures. What is the exact difference? I don't really understand what MSDN tells me about this. I usually use Effect parameters ...
3
votes
0answers
251 views

How do I generate a mipmap for a texture loaded from a stream?

I am loading a Texture2d from a stream: public static Texture2D GetTexture(GraphicsDevice dev, System.Drawing.Bitmap bmp) { Texture2D texture; using (MemoryStream s = new MemoryStream()) ...
1
vote
1answer
106 views

XNA texture overlay with offset

Is it possible to overlay one texture over another and make them into a new texture? It should also work with an offset. Here's an example: This texture and this texture should make this ...
0
votes
1answer
103 views

Texture not carrying over to game correctly?

I have created my map for my game using 3DS Max. I have then applied textures to the map within 3DS Max, where the textures all show correctly. I export the map as a .fbx file to use within an XNA ...
0
votes
2answers
331 views

XNA texture GetData exception

When using this code: public static Texture2D MakeTexRed(Texture2D tex) { Texture2D drawTex = new Texture2D(Game1.graphics.GraphicsDevice, tex.Width, tex.Height); Color[] data = ...
2
votes
1answer
803 views

XNA 4.0, FBX and Texture Loading Failures

I've been going through several tutorials on how to use XNA and understand a lot thus far. I've got a screen, I've got 2D sprites working, got a shader system operational, so far so good. Now I've ...
4
votes
1answer
211 views

Creating rectangles from the inner part of a texture2D

Ok, this may be hard to understand, but I'll do my best. You will see that the first image is a normal mario, and the other is the result I am looking for. I'm trying to find a way to extract ...
1
vote
2answers
116 views

Textures loading too large on smaller monitors

I have an XNA game, and when i run the game the textures load all good on my computer and on my tv and they're all bring drawn in the right position. But on my laptop, which screen is smaller then ...
2
votes
2answers
149 views

Create a variety a sprites from a single image in XNA?

I want to be able to take a single image and cut them up into a lot of images to make the sprites. How would I do that in XNA since I only know how to load the texture then use it without changing it? ...
0
votes
1answer
100 views

How to Draw texture between 2 Vector3

My scenario: RTS combat style, 1 unit fires beam on another unit My problem is i want to draw a flat texture between 2 Vector3 points. I have looked at various Billboarding styles but that doesn't ...
2
votes
2answers
625 views

How do I tile a specific region of a sprite?

I have a sprite that I use as a sprite sheet, where regions of the image represent various UI elements (window corner, border, background, etc.). I want to use a certain region of that sprite as a ...
0
votes
2answers
2k views

How do I draw a single Triangle with XNA and fill it with a Texture?

I'm trying to wrap my head around: http://msdn.microsoft.com/en-us/library/bb196409.aspx I'm trying to create a method in XNA that renders a single Triangle, then later make a method that takes a ...
6
votes
1answer
2k views

Sidescroller variable terrain heightmap for walking/collision

I've been fooling around with moving on sloped tiles in XNA and it is semi-working but not completely satisfactory. I also have been thinking that having sets of predetermined slopes might not give me ...
2
votes
2answers
1k views

What's efficient way to draw a lot of textured cubes in XNA4?

Title says it all. What's efficient way to draw a lot of textured cubes in XNA4?
3
votes
1answer
2k views

Reusing a render target to create multiple Texture2D's (XNA)

i want to be able to loop through a hole bunch of textures, and render them on an object. I then want the rendered image to be placed onto a texture2D. The point? well hopefully i will end up with an ...
5
votes
3answers
4k views

When should a bullet texture be loaded in XNA?

I'm making a SpaceWar!-esque game using XNA. I want to limit my ships to 5 active bullets at any time. I have a Bullet DrawableGameComponent and a Ship DrawableGameComponent. My Ship has an array of 5 ...
2
votes
2answers
3k views

Texture2D.GetData fails to return pixel colour data

Because I'm using sprite sheets instead of an individual texture per sprite, I need to pass in a Rectangle when calling Texture2D.GetData() in my collision detection for per-pixel tests. ...