Optional gl_Position in GLGL 1.40

According to the GLSL 1.40 spec, it is optional for a shader to write to gl_Position. What is this for? Is it possible to declare another variable to be used for position? If that’s the case, how is it done?

If your writing a geometry shader it’s not required if you have another way of getting the coordinates.

I think you have to understand that version 1.40 is really an intermediate from the usual fixed pipeline to a more flexible one.
I am pretty sure there will be extensions and core functions later on that will allow you to perhaps output directly to a buffer and then take that buffer as a direct input in a fragment shader over several passes, who knows, but relaxing the requirement to write to gl_Position is a part of it.

Though you do have to write to gl_Position if you want some meaningful graphics out if it or else it won’t rasterize vertices to fragments correctly.

I see, thanks!