View Full Version : Tranformation Results
02-16-2004, 09:25 AM
If I use glRotate, glScale, or any of the other functions to perform a transformation in OpenGL, is there anyway to get the results of the matrix multiplication (i.e. the transformed verticies) returned back to me, or can they only be sent down the pipeline from there?
Not in the brain-dead simple "tell me what you're thinking" way, no. There *are* ways to do that sort of thing, but they'll not be appropiate for what you're doing.
The easiest thing to do is to find yourself a vector library and apply the same operations you send to OpenGL on an appropiate matrix - this keeps the end result client-side and easily accessible.
This isn't, however, something to do for more than just debug. If you're wanting to do this kind of thing at run-time there's probably a better way of doing whatever it is you're trying to do. If this is the case, please post details!
02-16-2004, 01:20 PM
The reason I asked,was because I thought I could use those functions to make my really fast GPU do it, well, really fast.
Do you mean something like glGetDoublev(GL_MODELVIEW_MATRIX, double *ptr) that populates the ptr with the values of the modelview matrix?
What Bode said should work, BUT it wonīt be "really fast".
Either your GPU does it, but then you will slow your app down, due to syncronizing the CPU and the GPU, or the functions wonīt be processed by your GPU, at all, but the driver lets your CPU do it. Then their still might be a syncronizing issue AND itīs still done by your CPU.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.