12-07-2008, 02:39 AM
i feel that i am redundnantly calling these 3 seperate functions , because i always seem to do the 3 together (for obvious reasons). is there anyway these 3 calls can be combined into one?
12-07-2008, 09:30 AM
You can compute the final matrix by ourself and use glLoadMatrix
so you have to do only
computeMatrix(point, scaleFactor, &matrix);
You can also remove the push/popMatrix pair, but you must consider the camera transformation, so you can do something like that
computeMatrix(point1, scaleFactor1, &matrix);
computeMatrix(point2, scaleFactor2, &matrix);
if you want remove the glMultMatrix you have to compute the whole matrix on CPU.
or you can create a custom shader where you pass the matrix as uniform in openGL 3.0 style. :)
Btw, I don't know if the matrix multiplication is hardware accelerated, I guess that the computation is simply done by the driver.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.