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

Untitled

Started by shvalb Jan 19, 2005 at 3:09 PM 0 replies 250+ views
Original Post
shvalb
shvalb
if I need to add background by loading a jpg or anything else, do I have to render it to the screen for every frame, or is there a way to just load it and make it appear till the end of the rendering? what is the technique to add background, are there special direct-x functions for that, if someone could point me to a tutorial... Thanks.
turnpast
turnpast
There are a number of ways to add a fixed background, but yes you will have to render it (at least in part) every frame.

Method 1: Use the Sprite/ID3DXSprite interface to draw a texture the size of your viewport.

Method 2: Create a screen sized quad with transformed verts and render it with the background texture.

In both cases you will probably want to turn off the ZBuffer before you render it or make sure that it is rendered at the maximum depth.

Topic Locked

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

Sign in to reply to this topic.