package TestJApplet; import com.jogamp.opengl.util.FPSAnimator; import javax.media.opengl.GLAutoDrawable; public abstract class GLSkeleton<D extends GLAutoDrawable> { public final D drawable; protected FPSAnimator animator; protected int FramePerSecond = 24; public GLSkeleton() { this.drawable = createDrawable(); } protected abstract D createDrawable(); public final void refresh() { if (this.drawable == null) throw new RuntimeException("GLDrawable is not set."); this.drawable.display(); } public final void setAnimator(FPSAnimator paramFPSAnimator) { this.animator = paramFPSAnimator; } public final void runExit() { new Thread(new Runnable() { public void run() { if (GLSkeleton.this.animator != null) GLSkeleton.this.animator.stop(); GLSkeleton.this.drawable.destroy(); } }).start(); } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)