Your Universal Remote Control Center
Graphics & User Interfaces Forum - View Post
Up level
Up level
The following page was printed from


Original thread:
Post 1 made on Thursday June 4, 2020 at 01:57
Junior Member
June 2020
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?

Hosting Services by ipHouse