BLaZuRE
BLaZuRE

Reputation: 2406

Replacement for deprecated OpenGL: glEnum GL_LIGHTING

The books and websites I've gone through all tell me to use glEnable(GL_LIGHTING) to enable lighting. I've seen that this enum is now deprecated. What has superseded it and what other deprecated items should I look out for in lighting? Even new SO questions still mention GL_LIGHTING, so I haven't had much luck finding how to change this.

Upvotes: 0

Views: 1164

Answers (1)

Tim
Tim

Reputation: 35933

It's replaced by custom shaders. You're supposed to create any lighting-based variables that you need and treat them just like any other uniform in your shaders.

There's not a 'built-in' replacement for fixed pipeline lighting, you're expected to implement it yourself.

Upvotes: 2

Related Questions