Jump to content
  • Advertisement
Sign in to follow this  
Alundra

[Renderer] Public buffer class

This topic is 1876 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,

I saw in a lot of engine and public code that buffer class is a common way of doing.

But, the only public usage of the buffer is for the geometry who is stored in a mesh class generally.

This can be replaced by a class named MeshGeometry who can has template virtual pure function who is inherited.

Using a class MeshGeometry is more high level, more directly in context, it can be extended with DynamicMeshGeometry.

Why this method is not popular ?

 

Thanks

Share this post


Link to post
Share on other sites
Advertisement

First, buffers are not only for geometry ! You can put anything you want in them, there is a lot of way to represent geometry ofcourse, constants like projection matrix, bone array for skinning, linked list pool of node for various algorithm, from tiled light culling to per pixel translucency sort, octrees, histogram, and everything relevant to your renderer, or even not rendering stuff like array of particles to simulate them on gpu, ...

 

Second, virtual is an outcast banned keyword in a renderer. We have to deal with too much data, too much instances to keep a basic OOP style. grouping and sorting by types the primitive to call a compile time know method for rendering is far better. And this is of course only one thing, behind the scene, things can me split up for optimisation, sort by rendering states, mass instanciate, ... 

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!