|Post 1 made on Thursday June 4, 2020 at 01:57 |
I'm very new to OpenGL and want to start with the smallest and most portable standard, OpenGL ES 2.0. I believe I have basic understanding now about the rendering pipeline and most of the data structures.
Using C++ I would now write different classes for different objects (e.g. wheel, tree, sphere) but each class should supply its own vertex and fragment shader because they have custom implementations of creating transformation matrices, coloring and effects. From my understanding I should use vertex buffers to push the object meshes to the GPU and uniforms to apply parameters (e.g. that influence color, rotation etc.).
My problem is I can only use one program of vert+frag shaders in one context at a time but I want to draw multiple elements using their own shaders. What would be the general way to do this? Should I compile one huge shader from all the parts consisting of a list of switch cases?
Please read the following:
Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace
. For information on how to advertise your service or product click here
. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.