Sure. But you need to adapt your thinking to the tools that were well supported by older versions of OpenGL instead.

First, your basic algorithm is to render two objects, keeping fragments which...