Jump to content
  • Advertisement
Sign in to follow this  
MARS_999

glUniform4fvARB issues

This topic is 4833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am having issues with glUniform4fvARB not loading my 4 element array, but glUniform1fARB loads a single float correctly??? Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Hmm. I decided to use GLEW instead of managing my own extensions and loading them after seeing the 10k GLSL functions I said forget it. Then my problem was fixed... ;)

Share this post


Link to post
Share on other sites
What is the correct way to use the return value of glGetUniformLocationARB? As of right now I have 10 Uniform int types in an array, which I use and reuse for different shaders? Is this correct or does each uniform type for each shader have to have its own int variable...
e.g.

shaderVariable[0] = glGetUniformLocationARB(waterShader, "waterColor");
glUniform4fvARB(shaderVariable[0], 4, waterColor);
shaderVariable[1] = shaderVariable[1] = glGetUniformLocationARB(waterShader, "waterDepth");
glUniform4fvARB(shaderVariable[1], 4, waterDepth);





then in another shader i use shaderVariable[0], shaderVariable[1] over again for that shader, and its a global array. So is this right or wrong??

Thanks

[Edited by - MARS_999 on August 22, 2005 8:25:18 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!