Best strategy for rendering into cubemaps?

So, I currently have a roundabout method for cubemap rendering. I have a single "camera" with a 2D color & depth FBO. I render the six cube faces, one by one. After each pass I draw the FBO contents into the corresponding face of the cubemap.

It does work. But it's pretty convoluted, since it requires a lot of back and forth.

Now, as far as I can tell there's no such thing as a depth attachment for cubemaps, or at the very least, I'm going to assume that if there is, it's not available on my MBP ( ati x1600, 10.6.2 ).

So, is there a more clever way to do this? Perhaps by drawing directly into a cubemap face while using/re-using a discrete 2D depth buffer?

I'm about to implement omnidirectional shadow mapping by encoding depth into RGBA -- but I'm thinking that a more efficient way to render a scene into a cube map is an imperative first step.

... <texture> must either name an existing texture object with an target
of <textarget>, or <texture> must name an existing cube map texture
and <textarget> must be one of: TEXTURE_CUBE_MAP_POSITIVE_X,
TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z,
TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_Y, or
TEXTURE_CUBE_MAP_NEGATIVE_Z.

If you want depth testing while rendering to a color cube map face, you'll need a depth attachment, of course. This can be a renderbuffer, or a 2D texture (the targets do not need to match across all attachments, only sizes.)

For omni shadows what you probably really want is a depth cube map, so you could do depth-only rendering and not worry about RGBA encoding. Depth cube maps are part of EXT_gpu_shader4 (and GL3) but the Radeon X1x00 can't support them.

... <texture> must either name an existing texture object with an target
of <textarget>, or <texture> must name an existing cube map texture
and <textarget> must be one of: TEXTURE_CUBE_MAP_POSITIVE_X,
TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z,
TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_Y, or
TEXTURE_CUBE_MAP_NEGATIVE_Z.

If you want depth testing while rendering to a color cube map face, you'll need a depth attachment, of course. This can be a renderbuffer, or a 2D texture (the targets do not need to match across all attachments, only sizes.)

Quote:For omni shadows what you probably really want is a depth cube map, so you could do depth-only rendering and not worry about RGBA encoding. Depth cube maps are part of EXT_gpu_shader4 (and GL3) but the Radeon X1x00 can't support them.

My plan right now is to encode the depth into RGBA by packing/swizzling.

I just wanted to post an update that I was able to get a depth attachment to a cube fbo working. And it really does clean up my RTT/Cube pipeline... enough that I could render a lightprobe in real time, which is pretty cool.

As a small update, I just got omnidirectional shadowmaps working, albeit crudely. I'm not using high-quality depth to color packing as I still have some bugs to work out, and until then it's useful to be able to visually read my depth with the unrolled cube overlay graphic.