Reputation: 845
I want to have a global gradient that goes all the way across the window but it only appears in certain objects with OpenGL. It's a bit like using a 'Clipping Mask' in Photoshop, here is an example on what I am trying to achieve.
(by the way I am doing this with LWJGL in Java, but that shouldn't affect to much.)
Upvotes: 1
Views: 151
Reputation: 72261
Have the texture coordinates aligned with the screen coordinates of your objects. That will cause the texture to be mapped as you want to.
Upvotes: 2