Sign in to follow this  

Post image directly on the screen?

This topic is 1662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys. I was wondering if it was possible to post an image directly onto the screen (like a splash screen or intro screen). I'm using windows + direct3d. I could make a quad that fills out the whole screen and paste a texture on it but it seems a bit too complicated. Is there any other way?

Share this post


Link to post
Share on other sites

Hi,

well you could also simply copy the texture holding the image (the surface of the texture) to the backbuffer using either IDirect3DDevice9::UpdateSurface or IDirect3DDevice9::StretchRect.

But I would still recommend to go the way you mentioned, although it's not so easy. You can use the Sprite interface (ID3DXSprite), that will make the quad for you.

Share this post


Link to post
Share on other sites

Hi,

well you could also simply copy the texture holding the image (the surface of the texture) to the backbuffer using either IDirect3DDevice9::UpdateSurface or IDirect3DDevice9::StretchRect.

But I would still recommend to go the way you mentioned, although it's not so easy. You can use the Sprite interface (ID3DXSprite), that will make the quad for you.

Off-topic, however I like the:

 

Hi,

techincal details

It's great.

 

Cheers :)!

Share this post


Link to post
Share on other sites

If you're after a splash screen you could create a window without a caption or border -- a quick Google search should turn up plenty of code samples if you're not sure how to do so. smile.png

Share this post


Link to post
Share on other sites

If you're after a splash screen you could create a window without a caption or border -- a quick Google search should turn up plenty of code samples if you're not sure how to do so. smile.png

He was talking about a fullscreen image (or the same size as his main app window, if in windowed mode), why to create another window when you already have one with exactly the same properties as you would need? And it would even be quite complicated and could introduce some bugs/problems, especially in the windowed mode - making the window exactly cover the client area of the other window, don't make it appear in taskbar, move it together with the other window etc.

Share this post


Link to post
Share on other sites

Thanks for the answers. I'm gonna go with the textured quad then.

I just lol'd when i read that there was an Interface where it creates you a quad for the texture. I already wrote that myself so i won't need that :D Seems like i reinvented the wheel

Share this post


Link to post
Share on other sites

Thanks for the answers. I'm gonna go with the textured quad then.

I just lol'd when i read that there was an Interface where it creates you a quad for the texture. I already wrote that myself so i won't need that biggrin.png Seems like i reinvented the wheel

That's actually good, those interfaces (like sprite, font etc.) are fine if you want to get it working quickly, but sooner or later you'll probably realise that you want your own solution anyway.

Share this post


Link to post
Share on other sites

Hi,
well you could also simply copy the texture holding the image (the surface of the texture) to the backbuffer using either IDirect3DDevice9::UpdateSurface or IDirect3DDevice9::StretchRect.
But I would still recommend to go the way you mentioned, although it's not so easy. You can use the Sprite interface (ID3DXSprite), that will make the quad for you.

Off-topic, however I like the:

Hi,
techincal details

It's great.
 
Cheers smile.png!


Nerd.

*upvotes*

Share this post


Link to post
Share on other sites
Sign in to follow this