Login  Register

GLContext.getCurrentGL()

Posted by Haroogan on Apr 06, 2011; 4:44pm
URL: https://forum.jogamp.org/GLContext-getCurrentGL-tp2785820.html

Does GLContext.getCurrentGL().getGL2() snippet result in performance hits? I mean is it possible not to pass GL2 object everywhere, but rather call this snippet to get GL2 object when I need it without being worried of performance loss? (I'm asking because, I don't know whether there is some slow code or maybe synchronization behind the scenes...) I'm not happy with passing GL objects everywhere - that's ugly you know :) so just guide me if GLContext.getCurrentGL().getGL2() approach is safe and performance-friendly.