Search in sources :

Example 26 with GLCapabilities

use of com.jogamp.opengl.GLCapabilities in project tdme by andreasdr.

the class TDMEParticleSystem method main.

/**
 * @param args
 */
public static void main(String[] args) {
    // 
    Console.println("TDMEParticleSystem " + VERSION);
    Console.println("Programmed 2017 by Andreas Drewke, drewke.net.");
    Console.println();
    // no nifty logging
    Logger.getLogger("").setLevel(Level.SEVERE);
    // create GL caps
    GLProfile glp = Engine.getProfile();
    GLCapabilities caps = new GLCapabilities(glp);
    Console.println(glp);
    Console.println(caps);
    // create GL window
    GLWindow glWindow = GLWindow.create(caps);
    glWindow.setTitle("TDMEParticleSystem " + VERSION);
    // animator
    FPSAnimator animator = new FPSAnimator(glWindow, 60);
    // tdme particle system
    TDMEParticleSystem tdmeLevelEditor = new TDMEParticleSystem(glWindow, animator);
    // GL Window
    glWindow.addWindowListener(tdmeLevelEditor);
    glWindow.addGLEventListener(tdmeLevelEditor);
    glWindow.setSize(800, 600);
    glWindow.setVisible(true);
    // start animator
    animator.start();
}
Also used : FPSAnimator(com.jogamp.opengl.util.FPSAnimator) GLCapabilities(com.jogamp.opengl.GLCapabilities) GLWindow(com.jogamp.newt.opengl.GLWindow) GLProfile(com.jogamp.opengl.GLProfile)

Example 27 with GLCapabilities

use of com.jogamp.opengl.GLCapabilities in project tdme by andreasdr.

the class TDMEViewer method main.

/**
 * @param args
 */
public static void main(String[] args) {
    String modelFileName = null;
    // 
    Console.println("TDMEViewer " + VERSION);
    Console.println("Programmed 2014,...,2017 by Andreas Drewke, drewke.net.");
    Console.println();
    // no nifty logging
    Logger.getLogger("").setLevel(Level.SEVERE);
    // create GL caps
    GLProfile glp = Engine.getProfile();
    GLCapabilities caps = new GLCapabilities(glp);
    Console.println(glp);
    Console.println(caps);
    // create GL window
    GLWindow glWindow = GLWindow.create(caps);
    glWindow.setTitle("TDMEViewer " + VERSION);
    // animator
    FPSAnimator animator = new FPSAnimator(glWindow, 60);
    // tdme level editor
    TDMEViewer tdmeLevelEditor = new TDMEViewer(glWindow, animator, modelFileName);
    // GL Window
    glWindow.addWindowListener(tdmeLevelEditor);
    glWindow.addGLEventListener(tdmeLevelEditor);
    glWindow.setSize(800, 600);
    glWindow.setVisible(true);
    // start animator
    animator.start();
}
Also used : FPSAnimator(com.jogamp.opengl.util.FPSAnimator) GLCapabilities(com.jogamp.opengl.GLCapabilities) GLWindow(com.jogamp.newt.opengl.GLWindow) GLProfile(com.jogamp.opengl.GLProfile)

Aggregations

GLCapabilities (com.jogamp.opengl.GLCapabilities)27 GLProfile (com.jogamp.opengl.GLProfile)18 FPSAnimator (com.jogamp.opengl.util.FPSAnimator)12 GLWindow (com.jogamp.newt.opengl.GLWindow)8 GLJPanel (com.jogamp.opengl.awt.GLJPanel)4 GLAutoDrawable (com.jogamp.opengl.GLAutoDrawable)3 GLCanvas (com.jogamp.opengl.awt.GLCanvas)3 Frame (java.awt.Frame)3 WindowAdapter (java.awt.event.WindowAdapter)3 WindowEvent (java.awt.event.WindowEvent)3 GLRunnable (com.jogamp.opengl.GLRunnable)2 JFrame (javax.swing.JFrame)2 GL3SharedResources (maspack.render.GL.GL3.GL3SharedResources)2 GL3VertexAttributeInfo (maspack.render.GL.GL3.GL3VertexAttributeInfo)2 GL3VertexAttributeMap (maspack.render.GL.GL3.GL3VertexAttributeMap)2 StringIntPair (maspack.render.GL.GL3.GLSLGenerator.StringIntPair)2 GLJPanel (maspack.render.GL.jogl.GLJPanel)2 NWindow (automenta.vivisect.swing.NWindow)1 MutableGraphicsConfiguration (com.jogamp.nativewindow.MutableGraphicsConfiguration)1 NativeSurface (com.jogamp.nativewindow.NativeSurface)1