Page 1 of 4 1234 LastLast
Results 1 to 10 of 37

Thread: What better(faster):gluLookat or glTranslate/Rotate?

  1. #1
    Guest

    What better(faster):gluLookat or glTranslate/Rotate?

    What better(faster):gluLookat or glTranslate/Rotate?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Oct 2001
    Posts
    595

    Re: What better(faster):gluLookat or glTranslate/Rotate?

    Since i bet you only will call it a few times per frame it doesnt matter.. Put your energy on more practical optimizations.

    and the correct answer : depends on the number of rotate/translate you have to do

    /Mazy

  3. #3
    Senior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Poland
    Posts
    234

    Re: What better(faster):gluLookat or glTranslate/Rotate?

    If you are trying to make something like 'camera' take gluLookAt. It makes your code simpler and work good so many people use it (even in professional applications).

    It also depends of what your are doing really. There are some uses where glTranslate/glRotate would be more suitable.

    To make it fastest (IMHO) - if your camera is very simple you don't have to use gluLookAt (it would work faster). In other case use it.

    Orzech

  4. #4
    Senior Member Regular Contributor
    Join Date
    Nov 2002
    Location
    Sofia,None,Bulgaria
    Posts
    107

    Re: What better(faster):gluLookat or glTranslate/Rotate?

    As long as u guys use the GLU junk functions or use stuff like glTranslate/Rotate etc instead of own ma3x ops you will probably stay in the beginners forum
    The pain is coming...THIS SUMMER!

  5. #5
    Senior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Poland
    Posts
    234

    Re: What better(faster):gluLookat or glTranslate/Rotate?

    Originally posted by Mihail121:
    As long as u guys use the GLU junk functions or use stuff like glTranslate/Rotate etc instead of own ma3x ops you will probably stay in the beginners forum
    So why are you here if you are in 'advanced forum', my guru?

    I think there is no need of writing your own matrix operations - of course you can do it that way but in many programs there is no need of complicating your code. OpenGL commands works ok and you can fell free to use them.

  6. #6
    Member Contributor
    Join Date
    Apr 2002
    Location
    kremnica, slovakia, europe, earth, sol :-)
    Posts
    99

    Re: What better(faster):gluLookat or glTranslate/Rotate?

    Originally posted by Mihail121:
    As long as u guys use the GLU junk functions or use stuff like glTranslate/Rotate etc instead of own ma3x ops you will probably stay in the beginners forum
    interesting... but i actually don't see any reason why should i do transormation myself when driver does the job cool (and i think my routine as well as routine downloaded from some abandoned site will never employ some hardware acceleration - such as 3dnow!)...

  7. #7
    Senior Member Regular Contributor
    Join Date
    Sep 2002
    Location
    Poland
    Posts
    196

    Re: What better(faster):gluLookat or glTranslate/Rotate?

    Does gluLookAt is created with glTranslate and glRotate???

  8. #8

    Re: What better(faster):gluLookat or glTranslate/Rotate?

    As long as u guys use the GLU junk functions or use stuff like glTranslate/Rotate etc instead of own ma3x ops you will probably stay in the beginners forum.
    So why do you think your own matrix functions will be beter/faster? I think that you should use the gl functions because these could take advantage of a fast GPU while your functions will be done on the CPU.
    I could be wrong here...

    Unless you're writing Cg shaders or something I think it's a wast of time to write your own matrix functions since they will do the same thing the gl functins do and may even be slower...
    If you write a Cg shader you must write your own matrix functions.
    However, I don't think it is a waste of effort to implement your own lighting model if opengl's model does not cut it for you.
    But, you should do this with hardware shaders if possible, because a GPU can do this alot faster than a CPU ever can.
    -Jormungand

  9. #9
    Senior Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    763

    Re: What better(faster):gluLookat or glTranslate/Rotate?

    Does gluLookAt is created with glTranslate and glRotate???
    well, that's ... the first answer is "no", but that might not be true. The way it computes rotations are almost certainly never done with glRotate: it probably exploits the trick of building an orthonormal matrix by computing directional vectors and building the rotation directly. It ~could~ use glTranslate to translate the camera, but since its building a 4x4 matrix and uploading it to opengl anyway, it may as well modify the 4th column itself, too.

    so, the short answer is still "no".

  10. #10
    Guest

    Re: What better(faster):gluLookat or glTranslate/Rotate?

    I think that if we use gluLookat we do next steps:
    1. Calculate position of camera
    2. Calculate position of target
    3. Calculate position of up vector
    4. Let OpenGL calculate matrix using previous data.

    If we use glTranlate/Rotate we only let OpenGL calculate matrix. Doesn't it faster?

Page 1 of 4 1234 LastLast

Similar Threads

  1. Rotate triangles and set the gluLookAt
    By alihuseyin in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-18-2015, 04:07 PM
  2. gluLookAt vs glRotate glTranslate
    By m3ntol in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-02-2005, 04:19 AM
  3. difference between using glulookat & glrotate + gltranslate
    By mithun_daa in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 10-16-2003, 04:49 AM
  4. gltranslate + rotate?!
    By lateniteoverdose in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 08-14-2002, 03:23 AM
  5. gluLookat() vs. glTransform/glRotate - Which is Faster?
    By Heaven in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-16-2001, 10:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean