2
votes
1answer
70 views

Cancel a SpriteBatch I've started drawing

Background: I'm working on a control library for XNA to use in a couple game clients I've written. The way I've implemented Dialogs is to have them derive from the base XNAControl class. XNAControl ...
2
votes
1answer
106 views

SpriteBatch, trying to reduce draw calls

This my main draw call: Matrix Camera_transformation = player_camera_.GetTransformation(); // Background - AlphaBlend spritebatch.Begin(SpriteSortMode.Deferred, ...
1
vote
1answer
151 views

Spritebatch not working in winforms

I'm using the Winforms sample on the app hub and everything is working fine except my spritebatch won't draw anything unless I call Invalidate in the Draw method. I have this in my initialize method: ...
0
votes
1answer
189 views

Monogame/SharpDX Texture2D doesn't hold value

The problem I have discovered is most likely between classes, so I dont really have much option but to post the whole code here: https://www.dropbox.com/sh/smyw9t1ap3by2vd/pBX-aJJ-Qx I have been ...
0
votes
1answer
90 views

My Sprite Rectangle moves, but my sprite doesn't

Here's the issue, When I build, everything loads fine, everything works, but then, when you enter the game, the sprite is there. However, The sprite does not move, the sprite RECTANGLE does. Meaning ...
0
votes
1answer
250 views

SpriteBatch.end() Issue because of a thread

While playing, I use a thread to Load() and Unload() Texture2D. I have multiple ContentManager to only Unload() Texture2D I want to unload. But sometimes, I have this issue on the SpriteBatch.End() : ...
1
vote
3answers
266 views

Objects being drawn on wrong layers

I have the main game (Game1.cs) draw the sprites like so: //Clear everything GraphicsDevice.Clear(Color.CornflowerBlue); //Begin drawing ...
3
votes
2answers
169 views

XNA Sprite Clipping Incorrectly During Rotation

I'm having a bit of trouble getting my sprites in XNA to draw when near the edge of the screen. Seemingly if you use SpriteBatch to draw then XNA will not draw it if for example (mPosition.X + ...
1
vote
3answers
574 views

Smallest increment for a SpriteBatch depth between 0.0 and 1.0?

I experienced some problems with SpriteBatch in XNA when I tried to mix two different SpriteSort modes. (Begin with deferred, end, begin with BackToFront wasn't sorting properly.) I've settled on just ...
5
votes
4answers
3k views

How to clip cut-off text in a textbox?

I'm writing a textbox class for my XNA game and I'm using SpriteFont to draw the text. It's only a single line textbox so when the text width exceeds the size of the rectangle box, it currently just ...
3
votes
1answer
2k views

Why isn't my sprite being drawn in the correct position in XNA?

Sorry if this has been asked before, but I can't seem to find it here. I'm trying to make an asteroids clone in XNA. I took the Game State Management project and am making new classes for things like ...
4
votes
2answers
2k views

Performance/architectural implications of calling SpriteBatch.Begin/End in many different places?

I notice some code samples only call SpriteBatch.Begin and SpriteBatch.End in the game's main draw method and then draw everything within that method through direct SpriteBatch.Draw calls or indirect ...
3
votes
2answers
955 views

XNA C#: How can I prevent blurring when drawing from a RenderTarget2D?

I'm making a game and I want the end graphics to look chunky and pixellated, so I'm drawing from the spritebatch onto a RenderTarget2D which is 1/4th the size of the actual backbuffer, and then ...