Depth Test , Alpha, and Rendering issues

I have a couple of issues I am trying to figure out in the red circle. The turquoise sphere is set to translucent, and you can see that working in the other spheres behind it in the upper left of the red circle, but the sphere in the bottom left of the red circle is completely blocked. Im not sure what is causing that problem.

Also, the shading is pretty janky, is that because I am using ofDrawSphere()?

in the setup function:

ofEnableDepthTest();
ofEnableAlphaBlending();

the draw function:

void ofApp::draw()
{
    ofEnableDepthTest();
    
    cam.begin();
    arealight.enable();
    
    for(int i = 0; i<mesh.getNumVertices();i++)
    {
        ofVec3f p = mesh.getVertex(i);
        ofSetColor(ofColor::white);
        ofDrawSphere(mesh.getVertex(i),spheresize);
        ofSetColor(ofFloatColor(0.0,0.50,1.0,.25));
        ofDrawSphere(mesh.getVertex(i),spheresize*3.7);
    }
    
    mesh.draw();
       
    arealight.disable();
    ofSetColor(ofColor::red);
    ofDrawSphere(lightposition.get(),3);
    
    cam.end();
    ofDisableDepthTest();

    gui.draw();   
}

Hi there!

I think it might be the way OpenGL works, regarding translucency and the depth buffer. Basically:

In order to achieve translucency, all opaque objects must be drawn before drawing any translucent ones.

(From the OpenGL Wiki — Transparency Sorting )

So, with your for loop, you are mixing them.