# How can I achieve this lighting with OpenGL?

I'm currently trying to implement a type of "smooth" lighting. How can I achieve lighting which looks like this:

http://dl.dropbox.com/u/1668516/concept/warp3.png

Using OpenGl. I've attempted to use blending modes and have come very close to making it work but it came out like this: https://pbs.twimg.com/media/A1071viCEAAlFmJ.png

Edit: The technique usedis drawing the lighting image (a white gradient) then drawing all my images using the blending effect glBlendFunc(GL_DIST_COLOR,GL_ZERO) however the images come out slightly transparent as shown previously I also have no control of how dark the black background is.

and I also wasn't able to change the alpha of the black background which I want to be able to do.

Could I get a few pointers in the right direction?

• From the screenshots it's hard to understand what your problem is. Could you describe more what is wrong with your own result and what would you like to achieve? – msell Oct 21 '12 at 6:00
• Could you post what tutorial you are following or how you do it? – kravemir Oct 21 '12 at 9:20
• This question seems to be utterly of no use anymore due to the fact that one of the linked images is not available anymore. – dot_Sp0T May 30 '17 at 5:31

glBlendFunc(GL_SRC_ALPHA, GL_ONE)