how to make *.bmp as background

Started by
4 comments, last by apit 22 years, 2 months ago
hello members...how can i use *.bmp file as my background in openGL...let say i use sea scenary (bmp file) and others objects like peoples, birds and so on i use openGL coding...how can i make it? please guide me...
apit
Advertisement
not that I know but i''d say you should create a sky box , then bind the texture to that.
its easy...

1. switch to ortho view.
2. load identity.
3. draw the quad background to fit the ortho coords.
4. switch back to normal view.
5. clear the depth buffer.
6. draw your scene...



"The Railgun Master"
DaHeR


Edited by - DaHeR on February 2, 2002 2:53:24 AM
____________________________________MSN | AIM | YIM | ICQ
step 5 is very costly... it would be a lot easier to either disable depth testing, or disable depth writing when drawing the objects. you just have to make sure you draw them in the order you want. assuming it''s a simple scene, this would be faster.
Hi,

On my site, I''ve a example who display a BMP in background like a splash screen.

========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
quote:Original post by RipTorn
step 5 is very costly... it would be a lot easier to either disable depth testing, or disable depth writing when drawing the objects. you just have to make sure you draw them in the order you want. assuming it''s a simple scene, this would be faster.


yeah thanx i think i missed that one ! disabling the depth buffer write is better before 3 and enabling it ( if you want to ) in step 5 ....

"The Railgun Master"
DaHeR
____________________________________MSN | AIM | YIM | ICQ

This topic is closed to new replies.

Advertisement