Yes, it's called picking. You add a shader to each pickable object with a unique RGB color. Then when you click you take a texture sample (you want to disable filtering and mip mapping) and the resulting color is the index of your object. On some newer hardware like PS4 they actually just write the object id number into the texture so you don't have to do the conversion, but if you are doing it manually in OpenGL, then the color method is probably the easiest.
But without doing shader programming, and easier thing to do would be to have 2 collision meshes. The trimesh and an AABB. The first mouse click checks all the AABBs (basically a cube that encloses the object fully) and then if it hits (or it hits multiple AABBs) then you do the trimesh calculation, but only on the 1 or 2 objects that were hit. This should be fast enough.