Jump to content

  • Log In with Google      Sign In   
  • Create Account


[Renderer] Public buffer class


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Alundra   Members   -  Reputation: 755

Like
0Likes
Like

Posted 04 May 2013 - 09:04 PM

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



Sponsor:

#2 galop1n   Members   -  Reputation: 226

Like
0Likes
Like

Posted 05 May 2013 - 02:05 AM

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, ... 






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS