What to do with mulitple geometry models and the reuse of shader programs and textures?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What to do with mulitple geometry models and the reuse of shader programs and textures?

ElvJOGL
Hi,

what does anyone adept in JOGL does when you have a scene and you got repeat models, which have the same texture and use the same shader programs.

Do you need to recreate the shader programs and get a different program index for very model geometry that's in the scene or do you do create shader program once and just reuse the shader program index?

If you don't understand my question, I will paste the code from the helloTriangle to reference what I mean.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: What to do with mulitple geometry models and the reuse of shader programs and textures?

elect
I am not sure what you mean, paste the code for security

Anyway in general, the shader program creation is a relative not-so-fast process, so one tends to do it just once or the less as possible