Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Equivalent to D3DReflect for OpenGL


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
2 replies to this topic

#1 pbobzebuilder   Members   -  Reputation: 311

Like
0Likes
Like

Posted 19 November 2013 - 03:27 AM

Anyone knows if there's an equivalent to D3DReflet for Opengl ?

 

D3dReflect allows to Query the shader needs after compilation.

 



Sponsor:

#2 N.I.B.   Members   -  Reputation: 1211

Like
2Likes
Like

Posted 19 November 2013 - 04:14 AM

OpenGL is built around the concept of program reflection. There are a bunch of functions, some of them are:

glGetUniformLocation(), glGetUniformBlockIndex(), glGetFragDataLocation(), glGetFragDataIndex(), glGetAttribLocation(), glGetProgramResourceIndex(), glGetProgramResourceLocation(), glGetUniform().

 

glGetProgram() allows you to query a program for its properties, such as number of uniforms, attributes and GS and TF properties.

 

Note that reflection is not done on shaders, but on linked programs.


Edited by N.I.B., 19 November 2013 - 04:17 AM.


#3 pbobzebuilder   Members   -  Reputation: 311

Like
0Likes
Like

Posted 19 November 2013 - 05:50 AM

Thanks a lot !

 

glGetProgramResourceNameglGetActiveAttribglGetActiveUniform... will do the job. 


Edited by pbobzebuilder, 19 November 2013 - 05:51 AM.





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.



PARTNERS