Post image directly on the screen?

Started by
6 comments, last by Khatharr 10 years, 9 months ago

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?

"Errare humanum est, sed in errare perseverare diabolicum."

Advertisement

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.

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 :)!

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

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

- Jason Astle-Adams

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.

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

"Errare humanum est, sed in errare perseverare diabolicum."

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.

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*
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

This topic is closed to new replies.

Advertisement