glBlendFunc help please....

Hi guys,

I am trying to use a white and black image to make a cookie cutter type
effect - where white is clear and black is black.

I am using glBlendFunc with Gl_DST_COLOR and GL_ZERO.

My two images are at and

My code is at :

But for some reason I am getting a blank window.

Both images draw fine on their own.

Can anyone PLEASE help?



PS: I am in VC++ Express.

Add a glDisable(GL_BLEND); to the end of your DrawGLScene.

What is happening is that it works correctly the first frame, but each frame onwards still has blending enabled so it gets progressively darker each render until it goes black.

It is typical for an app to designate a “known” OpenGL starting state. So you typically you disable anything that you enable. (or enable anything you disable) that is different from your “default” state.

sqrt[-1] you are a genius. That fixed it. I had a bunch of people look at that code and couldnt see what was wrong so congrats to you and THANKS.