Sign in to follow this  
Infinity95

Post image directly on the screen?

Recommended Posts

Infinity95    324

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
Tom KQT    1704

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
superman3275    2061

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
jbadams    25676

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
Tom KQT    1704

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
Infinity95    324

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
Tom KQT    1704

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
Khatharr    8812

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this