
Re: FoxWorks Aerospace Simulator Editor
I have started working on this for GLC_lib, not sure if you'll find use in it. I hope you will!
This is how the model is rendered with the new flag I added - "glc::OutlineSilhouetteRenderFlag":

Every smoothing group/triangle group is encoded uniquely through triangle group ID and the mesh ID. A simple edge detection shader then runs on this output, and this is what gets drawn to screen:

Simply put, the shader puts two pixels everywhere, where neighboring pixels have different colors (sometimes subtly!). The X shape on the rectangle is simply a defect of my tessellation mechanism.
Additionally, later, the shader will also run a depth test (because right now some outlines which must be drawn according to rules would be omitted, e.g. in concave objects).
My plan is to add a (possibly) new element into GLC - something like "GLC_ScreenFramebuffer" or whatever. It's main goal will be merely drawing a screen quad with a user-defined shader OR with one of the predefined shaders (outline being one of them). What do you think? I would like your input on this, since you're the author.
Edit: I have later noticed you have already implemented pretty much what I want with rendering objects for selection - although I'm not really sure on how to proceed as it seems the code I want is buried underneath a lot of layers of other things. And that code does not include object ID into consideration, so outline is not drawn between some of the groups.
I really want to hear your opinion, as I'm thinking of leaving the "OutlineSilhouetteRenderFlag" flag OR maybe adding some mode to select primitives of any objects in the viewport? (if I'm not mistaken, right now it's only possible to select primitives of just one body). The latter would probably be more code, but would also be useful I suppose?
Edit 2: The functionality of outline silhouette is not same as that of selection rendering. For silhouette the scene must be rendered twice - first the front faces, then the back faces, it must include ID information of both primitives and the mesh that holds them, and the ID must be different for front and back faces to render convex meshes or cross-sections.
Here's what I got so far (this is all GLC_lib):

Later this evening I have also added shadow shader (it's not very high quality yet, can be made more HQ):
