Hi there !
I'm wondering if someone can help me to reorganize my idea about graphic rendering.
In fact i was thinking on how i can efficiently build up a good architecture for static and dynamic objects rendering.
For now, i have the idea to split the problem in two part.
1) For static object, i manage to create an octree.
Every node hold a list of triangle. With this , i can on pre-rendering build an octree that take every triangle in the scene and fill every node with the corresponding triangle. The question is how and where i can hold the informations about the vertex ...
-> If the node hold triangle = 3 vertex position information, that is suffisant for computing the location in the octree.
The first idea i had, is to keep in a triangle a pointer to the material and shaders informations. But i can't be more accurate than a triangle. In this way i can't compute a color/material/shaders for one vertex in the triangle. So i can keep in vertex a pointer to color/shaders/ material ? It's seem to be very hudge for large scene.
Moreover, i would to sort by shaders all triangle for rendering but if for exemple a bomb explose near a wall (wall triangle are already uploaded in graphic card) the shaders affect to the wall must be replaced by the bomb information for light computing. I need to change the shaders so reorganize the sorting i made before...
I'm really confused and i need your help...
basically i want someone give me an architecture (or a start ) to manage static object and dynamic. I want to be able to change when i want the material/ color/ shader of a vertexat any time if i need the fastest way i can. Or basically someone explain me how ogre or irrlicht do this job because i read a lot of code and it is hard to keep the things i'm looking for.
Thansk for any help