1
Graphics / Re: I tried to build a particle system with VertexArray
« on: March 10, 2025, 04:14:13 pm »
Or I should just use Sprite lists and draw them particle by particle?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I've no idea how VLC can be integrated into other applications.
Have you followed the Getting Started section: https://sfemovie.yalir.org/latest/start.php
In your setSprite function, you make a texture and assign it to the sprite. But the texture is just a local variable, so when the function ends the texture is deleted and the sprite now contains an invalid pointer to where the texture used to be.Thank you. Problem solved.
Textures need to have at least the same lifetime as a sprite, since sprites don't make a copy of the texture.
I just tested your first version, it works fine. (I usually use texture pointers in my resource system map, but textures work too)I wrote this and the program crashed here:
Are you sure that's the part causing the crash?