Stl file


i need to work on stl file using opengl
i dont understand how to load and view a stl file
and secondly there are function to pick a piece of an image? for example in my stl file there are 3 semiphere how can i select only one of them ?

You need to figure out which file format that .stl file follows. A few possibilities:
[li] [/li][li] [/li][/ul]
From context, you probably have a pretty good idea which one you’re dealing even before looking at its content.

For picking, you can use some CPU-based ray intersection capability, or you can render your model to an off-screen framebuffer with unique colors per object (w/o MSAA) and then test the color at specific pixels to see which object you’re dealing with. The advantage to the former is it doesn’t require a GPU readback.