Original Post
Hello! I have some problems with the drawing of sprites in Managed DirectX. This is how I currently draw the sprites, but it doesn't work. It throws "NullReferenceException". I think it's because _texture.ImageInformation.Width/Height doesn't return the size of the texture. To me, it doesn't look like this is how you are supposed to use the sprite class, so I'm asking for some help to solve this. Thanks in advance!
System.Drawing.Rectangle rect = new System.Drawing.Rectangle( 0, 0, _texture.ImageInformation.Width, _texture.ImageInformation.Height );
System.Drawing.SizeF size = new System.Drawing.SizeF( ( float ) _texture.ImageInformation.Width, ( float ) _texture.ImageInformation.Height );
_sprite.Draw2D( _texture, rect, size, position, System.Drawing.Color.White );