Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6825093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:58:53+00:00 2026-05-26T21:58:53+00:00

Until now, I worked with gluProject , perspective projection, and a zoomable square centered

  • 0

Until now, I worked with gluProject, perspective projection, and a zoomable square centered on the screen with a lower left vertex (-1,-1,0). I zoom the square adjusting the Z axis.

For example, I zoomed the square to Z=-5, and I call gluProject with the openGL object parameters (-1,-1,0) to know the window pixels X,Y position of that vertex of the square. It works fine.

But now, I changed my architecture, and now I’m not using Z to zoom, I’m scaling to zoom. I have the square at Z=-1.0f, and initially it is scaled to (0.01f,0.01f,0.0f), is a small square.

Which X,Y,Z values do I have to pass to gluProject? I’m passing -1,-1,0, and gluProject is giving me erroneous x,y outPutCoords values, (-101.774124,-226.27419)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:58:53+00:00Added an answer on May 26, 2026 at 9:58 pm

    Again and again and again: gluProject does exactly the same thing like the OpenGL transformation pipeline (if called with OpenGL’s matrices and viewport, of course). So whatever vertices you send to OpenGL, these are the vertices you have to put into gluProject.

    If you render the polygon using the vertex (-1,-1,0), then you have to call gluProject with this vertex. Every other transformation (be it translation, scaling, rotation, or whatever) comes from the transformation matrices. But if you indeed render the polygon using the vertex (0.01, 0.01, 0), then you have to put this into gluProject.

    Make sure you completely understand the OpenGL transformation pipeline (the answers to this question may help) and the workings of gluProject before continuing to use it and posting questions for every little input that you think gives wrong results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a graphical control that is multithreaded. Until now it worked fine, but
ReportLab/xhtml2pdf have worked perfectly until now when it crashes at this style bit in
Until now, I have worked primarily with LAMP applications, but have a project in
South migrations have worked quite well until now when I think it got mixed.
First of all: I'm new to Prototype JS Framework! Until now I worked with
I'm using flying saucer xhtmlrenderer for building pdf documents. Everything worked fine until now
Until now deploying my Application with macdeployqt worked fine, but after upgrading to Qt
Ok so I have worked and used my global variables until now, and it
I have an aspnet webapp which has worked very well up until now. I
Im trying to make an iOS App with Xcode, until now everything worked well.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.