View Full Version : Is it possible to turn off matrix operations in OpenGL?

denis-b

04-03-2001, 12:32 AM

I use OpenGL for 2D scenes and these transformations are not necessary (I don’t use glRotate, glTransform ... and I use orthogonal perspective).

I now that these transformations very often are not hardware accelerated and could take a lot of processor time.

Is it possible to turn off matrix operations (Model-View Matrix, Projection Matrix and Perspective Division) in OpenGL?

As far as I know, the answer is "No". But most drivers will (should ?) not do any operation if you set those matrices to the identity (use glLoadIdentity() for that: do not try to load your own identity matrix with glLoadMatrix !!).

Regards.

Eric

I think some smart drivers knows that multiplying any incomming vector/point with an identity matrix is useless, and skip this operation if the identity matrix is loaded. You can load all matrix stacks with the identity matrix, and maybe the driver will skip multiplication. But there is no general way of disabling these operations.

You can try glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST) aswell. But this is a hint only, and the driver can choose to ignore them.

Michail Bespalov

04-03-2001, 12:58 AM

Hi

Also take a look at

http://www.frii.com/~martz/oglfaq/transformations.htm#tran0040

9.040 How do I bypass OpenGL matrix transformations and send 2D coordinates directly for rasterization?

Powered by vBulletin® Version 4.2.3 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.