I should be able to see lines through the cube

  alpha-transparency, c++, opengl

Pic of my code running
Pic of "working" code

The Cube / Triangle shown have alpha values on their color of 0.51

The lines have an alpha value of 1.0

You should be able to see the lines behind the cube / triangle.

All planes in the cube are facing outwards so they can get culled properly.

Relevant Code:

glfwWindowHint(GLFW_SAMPLES, 4);
glEnable(GL_MULTISAMPLE);
glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glAlphaFunc(GL_GREATER, 0.5);
glEnable(GL_ALPHA_TEST);
glEnable(GL_CULL_FACE);

Source: Windows Questions C++

LEAVE A COMMENT