oizma / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Provide information about attribs and uniforms #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For a compiled shader, provide the following information about attribs and 
uniforms:
1. name
2. type
3. size

Original issue reported on code.google.com by alokp@chromium.org on 23 Aug 2010 at 7:21

GoogleCodeExporter commented 9 years ago
Should it return built-in gl_ uniforms too?

Original comment by alokp@chromium.org on 17 Sep 2010 at 6:19

GoogleCodeExporter commented 9 years ago
For consistency, I suppose so; the documentation for glGetActiveUniform 
indicates that the list of active uniform variables may include both built-in 
and user-defined uniforms. Plausibly it should only return those actually 
referenced by the shader.

Original comment by kbr@chromium.org on 17 Sep 2010 at 7:19

GoogleCodeExporter commented 9 years ago
I would really like to understand the point of glGetActiveUniform returning 
built-ins. 

You can't get a location for one of them. glGetUniformLocation explicitly 
disallows that.  I guess this just so you can know what other state might 
effect the shader?

Original comment by g...@chromium.org on 17 Sep 2010 at 9:11

GoogleCodeExporter commented 9 years ago
also, as far as I know there is no requirement that it return built-ins and in 
fact I've seen some drivers do return them and others don't. So, should we go 
for consistency and either require all of them or none of them rather than the 
current behavior which is they may or may not be in there?

Original comment by g...@chromium.org on 17 Sep 2010 at 9:16

GoogleCodeExporter commented 9 years ago
From my standpoint it would be fine to never return information for built-ins.

Original comment by kbr@chromium.org on 17 Sep 2010 at 10:53

GoogleCodeExporter commented 9 years ago

Original comment by alokp@chromium.org on 20 Sep 2010 at 6:41

GoogleCodeExporter commented 9 years ago
Fixed by r425, r440, and r441.

Original comment by alokp@chromium.org on 29 Sep 2010 at 4:57