glGetUniformLocation not needed anymore using OpenGL 4.3

Started by
0 comments, last by swiftcoder 10 years, 11 months ago

Hi all,

I have read recently a new feature of OpenGL who is GLSL binding.


layout(binding = 0) uniform sampler2D DiffuseTexture;
layout(std140, binding = 0) uniform ShaderBuffer
{
  ...
}

Since all can be binded in the GLSL shader, is glGetUniformLocation needed anymore ?

Thanks

Advertisement

Since all can be binded in the GLSL shader, is glGetUniformLocation needed anymore?

Provided you can convince your shader authors to correctly specify all the inputs, no, you don't need it anymore.

CG has provided something like this for a very long time, by making you bind attributes to predetermined semantics.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement