I'm implementing a renderer where the shading requires front-to-back rendering. I'm having issues figuring out how to initialize the blending function.
Here's what I tried.
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ONE);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
This results in a black screen.
The blog post says to use GL_ONE_MINUS_DST_ALPHA, GL_ONE and initialize the background to all black all translucent, which is what I think I'm doing. The post cites an nvidia whitepaper so I looked into that as well. I looked through the code there and they seem to do somewhat the same as me. However something is clearly wrong as it isn't working. If I don't use blending or use other blending functions things seem to work.
EDIT:
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA);
glutCreateWindow("Window");