Can you please show a complete and minimal code that reproduces the problem? By minimal I mean a simple Main() with a sprite, not your game engine ;)
Ok, Is this what you need?
static void Main
(string[] args
) { ImageTexture
= new Texture
("Image File Path"); ImageFile
= new Sprite
(ImageTexture
); Width
= ImageFile
.Texture.Size.X; Height
= ImageFile
.Texture.Size.Y; FormControl
.Draw(ImageFile
); }
If it is not than I have add code for what is going on in the parts of the engine.
Opening the window:
FormControl
= new RenderWindow
(VideoMode
.Desktop,
"Window Caption");FormControl
.Size = new Vector2u
((uint)FormWidth,
(uint)FormHeight
);
The two classes used for drawing objects to screen:
private Sprite ImageFile;
private Texture ImageTexture;
Loading the Image:
ImageTexture
= new Texture
("The image file.");ImageFile
= new Sprite
(ImageTexture
);Width
= ImageFile
.Texture.Size.X;Height
= ImageFile
.Texture.Size.Y;ImageFile
.Position = new Vector2f
((float)X,
(float)Y
);
Drawing the Image:
Core.FormControl.Draw(ImageFile);
If you need to put it in an archive, it's already too big. Can't you reproduce your problem in a simple Main() with few lines of code?
If you don't spend some time to properly find out what part of your code is wrong, and extract a minimal example from your project, nobody will be able to help you.
Sorry, but Drop Box makes me archive it in order for it to download properly. The test.bmp image can be replaced with any other image, the download of the code below includes it.
Here is the minimal code:
static RenderWindow FormControl
; static Texture ImageLoaded
; static Sprite ImageFile
; static void Main
(string[] args
) { FormControl
= new RenderWindow
(VideoMode
.DesktopMode,
"Error Example"); FormControl
.Size = new Vector2u
(640,
480); FormControl
.SetFramerateLimit(30); ImageLoaded
= new Texture
("test.bmp"); ImageFile
= new Sprite
(ImageLoaded
); ImageFile
.Position = new Vector2f
(32,
32); FormControl
.Clear(Color
.Black); ImageFile
.Draw(FormControl, RenderStates
.Default); FormControl
.Display(); Console
.ReadKey(); } Download to code above:
https://www.dropbox.com/s/58ckrxn0ltib5xa/ErrorExample.zip?m=&v=0mwns