Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    135
  • comments
    130
  • views
    52714

Getting back on track...

Sign in to follow this  
VisualLR

89 views

Ok, so I mentioned that my 3D woes deserved a post of their own, so here it is. SGE uses a deferred rendering architecture. For those unfamiliar with the term, what this means is that I put everything that is to be rendered in a list, once the list is generated, I iterate through the list and render each element of said list. This works pretty good, and it's really fast and also very easy to program. Getting something to render is as easy as:


sgRenderUnit* pRenderUnit = sgRenderer::GetNewRenderUnit(sgRenderer::RU_DEFAULT);

pRenderUnit->SetMesh(pMesh);
pRenderUnit->SetMaterial(pMaterial);

pRenderUnit->SetBaseTransform(sgMatrix4::IDENTITY);


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.

Comments? Suggestions?
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!