Skip to main content
GameDev.net gamedev.net
🔒 Locked

create a basic image background

Started by mangine Apr 25, 2004 at 12:25 PM 6 replies 500+ views
Original Post
mangine
mangine
I''m looking for a way to create a basic opening screen for a game, I''ve already made the JPG file for this, how do I get it to display now?
Remember who are today and tomarrow will arrive unnoticed.
Supernat02
Supernat02
One way is to create an XYZRHW quad full screen and texture it with your image.

Chris
Chris ByersMicrosoft DirectX MVP - 2005
mangine
mangine
I vaugly remember someone talking about this method. What about plain old sprites though? Don''t tell me they have taken them out of DX version 9? Have they?
Remember who are today and tomarrow will arrive unnoticed.
fyhuang
fyhuang
Some video cards don''t support textures beyond 256x256 -- just texturing the quad w/a fullscreen texture won''t work in this case.
- fyhuang [ site ]
Supernat02
Supernat02
Good point Fyhuang. Mangine, sprites are still available. You can use them to do the same thing. If you want to make your screen compatible with almost all 3D hardware out there, then break the image into 256x256 pieces and display them in sprites.

I think you want to turn all filtering off if you do that and you might consider using an orthogonal projection. Actually, that may only be useful if you use 3D space (instead of XYZRHW).

Chris

[edited by - Supernat02 on April 26, 2004 10:31:34 PM]
Chris ByersMicrosoft DirectX MVP - 2005
boebi
boebi
Sprites are still in DX9, and they are improved slightly from DX8. Use D3DXSprite and you should be fine. In case you don''t know, the D3DXSprite is just a textured quad...it prevents you from having to setup the vertex buffer yourself.

Happy coding.
mangine
mangine
Now I''m going to have to create a texture from my jpg. Any good tutorials on creating DX Textures?
Remember who are today and tomarrow will arrive unnoticed.
Evil Steve
Evil Steve
D3DXLoadTextureFromFile() (or whatever its called) will do the trick. Otherwise you''ll need to decode the JPEG yourself...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.