Re: drawScene for all events?
Posted by Wade Walker on May 17, 2012; 2:46am
URL: https://forum.jogamp.org/drawScene-for-all-events-tp3998011p3998383.html
Hi Scotsman,
This is more a general OpenGL question, rather than a JOGL question, but I'll take a stab at it anyway :) If you're loading an object from a file, then creating a vertex buffer from that, then drawing the vertex buffer, the only part of that process that needs to be in your display() method is the vertex buffer drawing. Reading the file and creating the vertex buffer should only need to be done once (unless the object's shape or texture is changing, then you would have to remake your vertex buffer too). You can set the viewport and camera different at the beginning of each display() without changing the vertex buffer.