Advertisement

640x480 background pic

Started by January 02, 2001 04:11 PM
6 comments, last by trigger 23 years, 10 months ago
Hi mates! I know that this topic was discussed before, but I couldn''t see any solution for this problem. "Lets say I have my screen 640x480 and I also have a nice bitmap of the same size that I want use as background pic. How would I draw the background first and then my 3d stuff in front of the pic?" - How can I display a 640x480 background pic, if I am limited to a texture size of 256x256? - Have I realy to split up my background pic into 256x256 textures? - Have I realy to switch into ortho mode and then draw the background pic or is there any better way to do this? - What have I to do that the pic fits to the screen? - What happens if the texture is larger than 256x256 (especially with 3dfx cards)? - How can I do this without massive FPS and image quality loss? Many questions this time ... hope that somebody can help! ...ahh, before i forget: HAPPY NEW YEAR!!! trigger
http://trigger.xenyon.net/
Anybody out there!?
http://trigger.xenyon.net/
Advertisement
Perhaps it''ll sound more like crazyness, but... why don''t you get the pointer to the back-buffer''s surface and blit the image onto it, directly?

Hope it helps...





[home page] [e-mail]

---
"Lifting shadows off a dream once broken
She can turn a drop of water into an ocean"
---[home page] [[email=karmalaa@inwind.it]e-mail[/email]]
glDrawPixels, I believe, but its slow. You can''t get a pointer to the backbuffer in GL.

I think it would be best to split the image into textures and draw it using an orthographic projection though.




~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!
I actually used textures. If necessary, the whole picture has been split up into multiple tiles. Since I''m using DirectDraw I used transformed vertices to draw the quad, but an orthogonal projection should just be fine. you can use
gluOrtho2D (0, ScreenWidth, ScreenHeight, 0)
to set up the correct matrix. You may have to play with texture filtering (I think no filtering at all should be okay). One thing that may also be usefull: don''t use integers for the position. Adding +/-0.5 pixels may improve the quality (at least it worked for me on all video cars tested so far)
Is there any other way? Or has anybody some good sourcecode?

trigger
http://trigger.xenyon.net/
Advertisement
looking for OTHER ways,
this is a longshot but it would theoritcaly work
use the "billboard" technique, so that the image is always facing the camera, then just place it behind the scene and larger enough to cover the whole screen.

it''''s all about a good time!
-Lokapujya
it's all about a good time!AOLIM name: -LOKAPUJA-
Ok, thanx for all! I got it.

I will first flip into ortho mode then render my splitted background pic on some Triangles, cause they are very fast on all cards. And then i easily do a glPopMatrix() to restore my old settings wich I had before flipping into ortho mode.

trigger
http://trigger.xenyon.net/

This topic is closed to new replies.

Advertisement