aconstlink / natus

[Discontinued] Software Framework for Audio/Visual/Interactive Real-Time Applications
https://aconstlink.de
MIT License
0 stars 0 forks source link

Reconfiguring render object with new geometry #265

Closed aconstlink closed 3 years ago

aconstlink commented 3 years ago

When reconfiguring a render object and updating the geometry fails to render on gl3. Screenshot 2021-02-25 111942

In the image, only one quad with two triangles via the tri_render_2d is rendered. When adding two variable sets to the render object upfront, so that the render_object is not reconfigured, the quad is drawn correctly. Screenshot 2021-02-25 112253

The issue must be related to updating the geometry and the render object. There is no issue if the geometry is not updated as done in the sprite_render_2d where a fixed amount of geometry is used with vertex pulling, where only the array_object is updated.

aconstlink commented 3 years ago

Fixed the issue. Here the vertex layout in the gl backend was not cleared and so used a bigger stride in the vertex lookup. Need to check es3. Screenshot 2021-02-25 185023