1
votes

I wanted to know whether it's possible to show a 2D Texture in XNA without a window that contains it. Just like drawing a picture/texture (maybe with the SpriteBatch.draw()-method?) simply onto the screen, independent from a seperated window. (What comes to my mind here is the Photoshop-opening window) Is this possible in XNA? I can't find anything like this for SpriteBatch. Do I have to write totally new code/method?

1
It is called splash screen. Try to search together with xna word itself.Sinatr
Can you expand on the 'without a window'? Would an image in a window work if the window border was hidden or invisible? Or are you looking for an image without a window container?John Yost

1 Answers

0
votes

If you mean splash image, it might be drawn from another application before launch (aka launcher) or you can show border-less window with image while loading application content in background.

Unfortunately XNA does not support border-less window, however there is walk-around using windows forms: https://gamedev.stackexchange.com/questions/37109/is-there-a-simpler-way-to-create-a-borderless-window-with-xna-4-0

If you will be able to create borderless window with XNA, then you need to change window size in constructor to splash image size, and draw same size image while loading content.

I would not recommend displaying splash image as it serves no real purpose, if you want to display some logo while starting the game - simply start game in fullscrean and draw image on black background while loading content, this is the way all modern games does it.