GLGraphics GLModel in class
in
Contributed Library Questions
•
2 years ago
Hi, I'm trying to get my head around creating a particle generator using GLModel.
I have in the main class a call that instantiates the particle controller, then the particle controller updates the vectors.
What I can't figure out is where I need to update the model. As I have one model with max_particles * 4 (I'm using QUADS), my understanding from reading the post about getting started with GLGraphics is that the most efficient way of updating the position is via a FloatBuffer.
I have a Particle class that has an update function, adding the vectors, and an updateVertex function that uses the FloatBuffer to add the positions into the vertices.
What I can't figure out is where do I add the render.model() and updateVertices() functions in my particle controller.
1