JacquesDiringer / GLEngine

Graphic Engine, OpenGL render system
2 stars 0 forks source link

Renderable collections hash function #9

Open JacquesDiringer opened 6 years ago

JacquesDiringer commented 6 years ago

When collecting renderables, especially when batching them for instancing, generate a unique determinist identifier dependent on the content of the collection. This identifier will then be compared to the identifier of the previous frame. If the identifiers are the same, we will use the old instances VBO. If the identifiers differ, we will regenerate the VBO.