Jump to content
  • Advertisement
Sign in to follow this  
troxtril

using custom uniforms instead of build-ins

This topic is 3469 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 want to create a fully custom library including my own fog and light classes but most of the shader examples use the build-in uniforms such as gl_LightSource or gl_Fog. and these uniforms are also limited with GL_MaxLights and etc. is there a drawback using your own custom uniforms instead of these build-ins?

Share this post


Link to post
Share on other sites
Advertisement
Using custom uniforms is preferred way. OpenGL 3.0 has deprecated all built-in uniforms. In v3.0 forward compatible context does not allow to use any built-in uniform/attribute at all.

Share this post


Link to post
Share on other sites
the only benifit of built in uniforms is they exist over multiple shaders

I wouldnt recommend using them, I do (+ I suspect the examples do as well ) cause we're lazy

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!