luminance-rs icon indicating copy to clipboard operation
luminance-rs copied to clipboard

Why GL_ARB_separate_shader_objects?

Open KeyboardDanni opened this issue 2 years ago • 1 comments

I noticed that in the injected shader header, the GL_ARB_separate_shader_objects extension is being marked as required:

https://github.com/phaazon/luminance-rs/blob/0401251ad8ea8dbed788e2448f78b9574ef98321/luminance-gl/src/gl33/shader.rs#L258

My understanding is that if you want to use different vertex and fragment shaders together, you would need to create a new Program object anyway. So far I'm not aware of any part of the API that has these separate. Using GL_ARB_separate_shader_objects means that I'm not going to be able to target GLES, which does not have this extension (it has GL_EXT_separate_shader_objects but it's only supported by 8% of device configurations according to gpuinfo.org). It's technically not in core in OpenGL 3.3 either.

Is this something that can be removed?

KeyboardDanni avatar Mar 22 '22 22:03 KeyboardDanni

The GLES backend doesn't need GL_EXT_separate_shader_objects - it adds a different header that does not require any extensions. That said, I'm not sure why separate shader objects is needed for plain OpenGL either.

ColonelThirtyTwo avatar Feb 24 '23 01:02 ColonelThirtyTwo