Skip to main content
gamedev.net
🔒 Locked

glGetUniformLocation not needed anymore using OpenGL 4.3

Started by Alundra May 18, 2013 at 1:13 AM 0 replies 3.3k views
Original Post
Alundra
Alundra

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

swiftcoder
swiftcoder

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]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.