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

  • SEARCH
  • Home
  • 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 3406530
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:38:20+00:00 2026-05-18T05:38:20+00:00

My instructor says they can be used interchangeably to affect the projection matrix. He

  • 0

My instructor says they can be used interchangeably to affect the projection matrix. He argues that gluLookAt() is preferably used because of its ‘relative simplicity due to its ability to define the viewing angle’. Is this true? I’ve seen code examples using both gluLookAt() and glFrustum() and I’m wondering why would the programmmer mix them.

Like in the cube.c example of the redbook appears:

void display(void)
{
  glClear(GL_COLOR_BUFFER_BIT);
  glColor3f(1.0, 1.0, 1.0);
  glLoadIdentity(); 

  gluLookAt(0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
  **//why isn't this a call to glFrustum?** 
  glScalef(1.0, 2.0, 1.0); 
  glutWireCube(1.0);
  glFlush();
}

void reshape(int w, int h)
{

  glViewport(0, 0, (GLsizei) w, (GLsizei) h);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 20.0); 
  //why isn't this a call a call to gluLookAt()? 
  glMatrixMode(GL_MODELVIEW);
}
  • 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-18T05:38:20+00:00Added an answer on May 18, 2026 at 5:38 am

    Both glFrustum and gluLookAt perform simple matrix multiplication. Check the man pages for equations for those matrices:

    gluLookAt

    glFrustum

    Both of those can be replaced by a glMultMatrix* call.

    The most important difference is that glFrustum is used most of the time to establish a perspective projection matrix (used internally by gluPerspective), and gluLookAt is a convenience method for specifying model-view matrices (usually: implementing a camera).

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

Sidebar

Related Questions

I'm trying to add visible text to a password field that says Enter a
Google says that the content is duplicated www.example.com/pagedcontent/page3 / www.example.com/pagedcontent/page3 I redirected using redirect
The following article http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPXSLT3.html says that XPATH considers the following to be nodes: Root
its function subtotalspool. It says i cant use it as a function somewere inside
I'm new here same as I'm new with assembly. I hope that you can
Am I right in understanding the .NET XmlIgnoreAttribute , which says: Instructs the Serialize
I am the lead instructor of web & internet related courses on a private
I'm a teacher(instructor) of CS in the university. The course is based on Cormen
I'm working through SICP on my own, so I don't have an instructor to
Can anybody provide some instruction on how to setup a war file to show

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.