This is strange
Nope. The fixed function has been replaced by a programmable pipeline that allows you to design your conversions the way you want.
Should I create them in an opengl application and then multiply the vertices in the vertex shader using matrices?
If you want to have something that works just like the old pair of OpenGL matrix stacks, then you want your vertex shader to look like, for example:
in vec4 vertexPosition; // ... uniform mat4 ModelView, Projection; void main() { gl_Position = Projection * ModelView * vertexPosition; // ... }
(Of course you can optimize a bit)
And the corresponding client size code (shown here with C ++ here) will look like this:
std::stack<Matrix4x4> modelViewStack; std::stack<Matrix4x4> projectionStack;
I assumed that you have a Matrix4x4 class that supports operations like .translate() . A library like GLM can provide you with client-side implementations of matrices and vectors that behave as corresponding GLSL types, as well as implementations of functions like gluPerspective .
You can also use OpenGL 1 through the OpenGL compatibility profile, but this is not recommended (you will not use the full potential of OpenGL then).
The OpenGL 3 (and 4) interface is lower than OpenGL 1; If you think that this is too much code, then most likely you are better off working with a rendering engine such as Irrlicht.
source share