我正在尝试渲染一个带有alpha值并启用深度测试的顶点数组(请参阅下面的代码),但是对最终图像中的点进行干扰(参见下图)。
有解决方法吗?
ofEnableBlendMode(OF_BLENDMODE_ALPHA); //openframeworks alpha blend call
glEnable(GL_DEPTH_TEST); // Enables Depth Testing
glDepthMask(GL_TRUE);
glDepthFunc(GL_LESS); // The Type Of Depth Testing To Do
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo);
glVertexPointer(3, GL_FLOAT, sizeof( float4 ), 0);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, cbo);
glColorPointer(4, GL_FLOAT, 0, 0);
glPointSize(1);
glDrawArrays(GL_POINTS, 0, counter);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
glDisableClientState(GL_COLOR_ARRAY);