vertex visibility

How Can I check whether a vertex on a mesh that I’v load is visible or not?so that I would like to set the vertices that are visible to have a value 0.5 and those that are not visible to 1.0

Are there functions to do that?

Use an occlusion query.

Basically render the potential occluders, then ask the GPU whether it can see one or more POINTS (or other primitives). It’ll tell you how many fragments it can actually see per query.