sgRenderUnit* pRenderUnit = sgRenderer::GetNewRenderUnit(sgRenderer::RU_DEFAULT);
pMesh is a simple class with a vertex and index buffer, material has the textures and shaders.
Anyway, this all worked great until I reached the point where I wanted to make my particle and font systems. The reason this became a problem comes from the use of dynamic buffers.
The problem is, if a dynamic buffer gets full, I need to create a render unit, this gets added into the list. But what happens if I have more geometry that needs to use that buffer? if this was not a deferred renderer, I would simple render whatever was in the buffer, flush the buffer and start using it again. Since this IS a deferred renderer, I need the buffer to be flushed on the next frame, AFTER the list has been rendered. This caused stuff to flicker...
I have tried quite a few more things than this, with pretty bad results... unfortunately, I have not found information on deferred renderers and how they handle dynamic rendering.
So, today I started looking into the possibility of switching to a non-deferred architecture. It seems that it will be a lot of work, but if it solves this problem it would be worth it.