View Full Version : Where do I put calculations?
12-14-2010, 09:06 AM
Where I have to put calculations? In draw function?
12-14-2010, 11:47 AM
12-14-2010, 12:32 PM
You didn't provide any information or describe a problem. We do not know what calculations you are referring to.
12-15-2010, 01:26 AM
For example physics one, collision checking, etc.
12-15-2010, 01:45 AM
Unless you are doing GPGPU to do them, physics and collision checking has nothing to do with OpenGL.
12-15-2010, 01:58 AM
But every single game has some physics and collision checking, so I want to know, if it does matter where I put it, or I can put it wherever I want to.
12-15-2010, 05:32 AM
You can put them into another thread than the rendering thread, if that is what you wanted to know. Or you can do your calcs on the GPU, using your favorite technique..
12-15-2010, 08:29 AM
I think he is just asking a simple question here.
You can put your calculations in the draw function or another function or another class. You can make a free function if you want.
The question is in regards to learning to be a programmer.
12-15-2010, 12:22 PM
Read this, is far better then try to answer a complex question in two lines
The difficult part is to synchronize the data and the 3d models. There are a lot of technique to do that.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.