I have a working OpenGL code where i render a terrain with some trees.
I am doing all the matrix mathematics on the client side. Because of which the frame rate of my app is very low, around 25-30 [its not LOW but, i used to get 60 before the calculations]
If i were to do all these matrix transformations on server side, in say vertex shader, or even better a geometry shader, are there functions in GLSL which translate, rotate, ans scale?
for example, what would the following client side code look on server side?
model = tes_terr.glm_model; //get the current camera movement matrix
model *= glm::translate( glm::mat4(1.0f), glm::vec3(tvec.x, tvec.y, tvec.z))
* glm::rotate ( glm::mat4(1.0f), -90.0f, glm::vec3(1, 0, 0))
* glm::scale ( glm::mat4(1.0f), glm::vec3(scaleFactor));
Or do i have to write these function in vertex shader separately.