Jump to content
  • Advertisement
Sign in to follow this  

Positioning 2D QUAD in front of screenview

This topic is 2362 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello i just made and postprocess effect but i need to draw it on the whole screen not only on the part of the screeen, i decided to draw it with glulookat because glortho didn't work for me:

so what i am doing: i first draw scene then i copy it to texture and draw a quad (in example 1024x768 [not pixels]) and position it at the 0,0,0 point (starting point) the center of this quad is 512,384,0 (x,y,z)

then i call gluLookAt(512.0f,384.0f,256.0f, 512.0f,384.0f,0.0f, 0.0f,1.0f,0.0f);

but the quad i see is too big - so theres a problem how can i calculate the proper distance to draw this quad on the whole screen (screen dimensions are 1024x768 pixels) and my z_near value is 0.010f

this is what i've got now, ahh and i need this quad to be quite larger because i need to see (its really a 3d grid) some different z values from it to actually see the effect lets say z = about 200 points


Peace ;d Edited by ___

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!