Couple of options to get the effect you want - but they do come a a cost:
- Write the holes into the stencil buffer or destination alpha channel, then draw the skybox last, using a suitable stencil test or alpha blend, and with no z-test?
- Render the skybox to a texture at the start of the frame, and project that on to the 'hole geometry'
I suspect that there must be a way to do this by using/abusing the z-buffer, too - but you probably want to z-test the 'hole polygons' using their real Z, then write a different Z. You could probably use multiple passes and the stencil buffer - drawing the hole 3 times with renderstate set up like this might work:
- Pass 1: No z-test, Clear stencil under hole polys
- Pass 2: Normal z-test, Increment stencil value (where depth test passes)
- Pass 3: Clear Z where stencil > 0
You'd still need to draw in a specific order - first the environment, then the holes, and finally the skybox last, though.