Jump to content
  • Advertisement
Sign in to follow this  
Alundra

RenderWindow + GBuffer + Events

This topic is 1855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

I have a RenderWindow class who is inherited by renderer (D3D11 and OGL4).

In each of them they have a GBuffer instance and have an array to get events.

What i'm saying in my head is, only one GBuffer is needed and so it can be managed by the render window.

Same for the ortho matrix, only one is needed so it can be managed by the render window.

Is it a correct design to handle that ?

 

My second question is :

Do you have a nice design to handle event ? Actually I have a callback in IGameState and the MainLoop sends

each event stored for the active RenderWindow and the application manage each one.

 

Thanks

Share this post


Link to post
Share on other sites
Advertisement

What i'm saying in my head is, only one GBuffer is needed and so it can be managed by the render window.

 

Are you implying to GBuffer here as some sort of class, that keeps/manages the GBuffer render targets? If so, I generally don't see any need for this, a gbuffer is nothing more than said render targets, your render architecture determines when they are set/cleared, and the effects pick them as input texture if they need to, at least I('d) design it that way, maybe someone with more experience has an even better idea.

 

Same for the ortho matrix, only one is needed so it can be managed by the render window.

Is it a correct design to handle that ?

 

I wouldn't say that there only needs to be one ortho matrix. There can be many needs for more than one: Rendering non-screenspace pre-transformed sprites, shadow mapping, etc... all of whose are going to need a different ortho matrix. I haven't figured a scalable design for this out myself, so I can't give you a hint here, sorry! I'm just thinking that you might be restricting yourself if you have the render window completely handle the ortho matrix. I have my render window in my 3d editor keep its own camera (view+ortho-matrix), but thats about it...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!