Where do I put calculations?

Where I have to put calculations? In draw function?


You didn’t provide any information or describe a problem. We do not know what calculations you are referring to.

For example physics one, collision checking, etc.

Unless you are doing GPGPU to do them, physics and collision checking has nothing to do with OpenGL.

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.

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…

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.

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.