Class SingletonGpuManager
java.lang.Object
cz.fidentis.analyst.glsl.code.impl.SingletonGpuManager
A singleton object managing with OpenGL contexts and their GLSL programs, shaders and buffers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SingletonGpuManager
Returns the single instancegetOrCompile
(com.jogamp.opengl.GLContext glContext, GlslProgramDef program) Compiles the GLSL program, re-uses already compiled programs.void
release
(com.jogamp.opengl.GLContext glContext) Should be called before the OpenGL context is erased.
-
Method Details
-
getOrCompile
Compiles the GLSL program, re-uses already compiled programs.- Parameters:
glContext
- OpenGL context. Must not benull
. 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 benull
. Must be at least GL2.
-
getInstance
Returns the single instance- Returns:
- the single instance
-