Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

glGetUniformLocation not needed anymore using OpenGL 4.3

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 Alundra   Members   

2289
Like
0Likes
Like

Posted 17 May 2013 - 07:13 PM

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


Edited by Alundra, 18 May 2013 - 06:53 AM.


#2 swiftcoder   Senior Moderators   

18222
Like
0Likes
Like

Posted 17 May 2013 - 11:17 PM

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 - Software Engineer @ Amazon - [swiftcoding] [GitHub]





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.