Class SingletonGpuManager

java.lang.Object
cz.fidentis.analyst.glsl.code.impl.SingletonGpuManager

public final class SingletonGpuManager extends Object
A singleton object managing with OpenGL contexts and their GLSL programs, shaders and buffers.
  • Method Details

    • getOrCompile

      public CompiledProgram getOrCompile(com.jogamp.opengl.GLContext glContext, GlslProgramDef program)
      Compiles the GLSL program, re-uses already compiled programs.
      Parameters:
      glContext - OpenGL context. Must not be null. Must be at least GL2.
      program - GLSL program
      Returns:
      The reference object to the compiled GLSL program
    • release

      public void release(com.jogamp.opengl.GLContext glContext)
      Should be called before the OpenGL context is erased.
      Parameters:
      glContext - OpenGL context. Must not be null. Must be at least GL2.
    • getInstance

      public static SingletonGpuManager getInstance()
      Returns the single instance
      Returns:
      the single instance