Advertisement

I Need Help

Started by December 01, 2002 09:58 PM
7 comments, last by Orlandu 22 years, 3 months ago
I Have a Texture in Bitmap for a Game and I want to Insert It As a Background in Fullscreen... with OpenGL Anybody Can Please Give Me The Script To Proceed Count T.G. Cid (Orlandu) The Holy Swordman
Count T.G. Cid (Orlandu) The Holy Swordman
Turn off depth testing, draw a quad that fills up the screen (in ortho mode). This assumes that you have the texture loaded. That''s probably gonna be fillrate intensive, but it''s one of the only ways. Of course, you can also draw the image as a bitmap on the screen, but that can be tricky. Show some sign of attempt or understanding and we''ll be able to help further.

Peace,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[twitter]warrenm[/twitter]

Advertisement
Well , hummm the problem is that im really new in C++ so I didn''t really understand what you said. I don''t know if you have a script to explain...

I know it''s hard to explain to a newbie like me

If you really don''t understand well I''ll try find it myself

Count T.G. Cid (Orlandu) The Holy Swordman
Count T.G. Cid (Orlandu) The Holy Swordman
quote:
Anybody Can Please Give Me The Script To Proceed


The hell are you talking about?
Lol I was talking about ... how to put a Bitmap Image In Backdrop and In Fullscreen

Is it more clear ?

Count T.G. Cid (Orlandu) The Holy Swordman
Count T.G. Cid (Orlandu) The Holy Swordman
Don''t waste our time if you''re a C++ newbie. You have no idea the effort that goes into doing what you ask for, and none of us is going to spoonfeed you.

[twitter]warrenm[/twitter]

Advertisement
Learn C++ first, only try OpenGL once you completely understand C++.
www.FlegDev.tkJust code it!
Take at look at the Nehe (tutorials 20 and 21) or Gametutorial.com (masking and ortho mode) tutorial on using orthographic projections.

Essentially to do what you ask you must:

1) create an orthographic project (say 800 x 600 pixels)
2) map a texture to the quad using glTexCoord2d(..) and glVertex2d(..)
3) then if you want to draw something on top of the background you change the projection mode (you can stay in ortho if you want) and repeat for each frame.

Hope this helps, Kiel

------------------------------------

www.lancs.ac.uk/ug/gilleade "Silent Beginnings"

1. First you have to load your bitmap file from disk in order to get an array of pixels.
2. Secondly you have to upload this array of pixels into an OpenGL texture.
3. And at last (but not least) you have to render this background texture at the beginning of every new frame

That should do the trick.
In those 3 steps, which one(s) have you ever done ?

Edit:
omega just replied while I was doing so.
"His" three steps corresponds to a little more advanced description of "my" third step.

[edited by - vincoof on December 2, 2002 10:06:07 AM]

This topic is closed to new replies.

Advertisement