A
A
Airat19952016-07-07 09:43:17
OpenGL
Airat1995, 2016-07-07 09:43:17

Am I understanding the OpenGL ES program correctly?

Hello, I'm learning OpenGL, and recently the question arose, if I want to draw several different models with different shaders, for this I need to create a program for each model or do I need to use one program for all models, and just link new shaders to it every time?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Airat1995, 2016-07-07
@Airat1995

Asked this question on stackiverflow stackoverflow.com/questions/38253000/is-it-necessa...
I will also write the answer here: the process of creating, linking and compiling a program is a long process, so doing this every frame will be a very costly action. So for each mesh there should be its own program or if the shaders do not differ, then it is possible to use one program (The last sentence is my additions).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question