congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
GLJPanel
Code IndexAdd Tabnine to your IDE (free)

How to use
GLJPanel
in
com.jogamp.opengl.awt

Best Java code snippets using com.jogamp.opengl.awt.GLJPanel (Showing top 6 results out of 315)

origin: com.harium.propan/propan-jogl

@Override
protected GLAutoDrawable createGLComponent(GLCapabilitiesImmutable capabilities, GLContext shareWith) {
  GLJPanel canvas = new GLJPanel(capabilities);
  canvas.setEnabled(false);
  return canvas;
}

origin: eu.mihosoft.vrl.vrljogl/vrl-jogl

GLJPanel panel = new GLJPanel(capabilities);
panel.setFocusable(true);
canvas.setScalableSurface(panel);
panel.addGLEventListener(canvas);
panel.addMouseListener(canvas);
panel.addMouseMotionListener(canvas);
panel.addMouseWheelListener(canvas);
origin: dhale/jtk

 public void run() {
  System.out.println("main:run");
  GLCanvas canvas = new GLCanvas();
  GLJPanel jpanel = new GLJPanel();
  canvas.addGLEventListener(new Guts("GLCanvas"));
  jpanel.addGLEventListener(new Guts("GLJPanel"));
  makeFrame(canvas,"JoglDemo: GLCanvas");
  makeFrame(jpanel,"JoglDemo: GLJPanel");
 }
});
origin: matsim-org/matsim

public static Component createGLCanvas(OTFVisConfigGroup otfVisConfig) {
  //turn off HiDPI uiScaling in Windows (issue MATSIM-875)
  if (System.getProperty("os.name").startsWith("Windows")) {
    System.setProperty("sun.java2d.uiScale", "1.0");
  }
  GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2));
  if (otfVisConfig.isMapOverlayMode()) {
    caps.setBackgroundOpaque(false);
    // A GLJPanel is an OpenGL component which is "more Swing compatible" than a GLCanvas.
    // The JOGL doc says the tradeoff is that it is slower than a GLCanvas.
    // We use it if we want to put map tiles behind the agent drawer, because it can be made translucent!
    GLJPanel glJPanel = new GLJPanel(caps);
    glJPanel.setOpaque(false); // So that the map shines through
    return glJPanel;
  } else {
    // This is the default JOGL component. JOGL doc recommends using it if you do not need a GLJPanel.
    return new GLCanvas(caps);
  }
}
origin: MarginallyClever/Makelangelo-software

/**
 * clear the panel
 *
 * @param gl2
 */
private void paintBackground(GL2 gl2) {
  // Clear The Screen And The Depth Buffer
  gl2.glClearColor(212.0f / 255.0f, 233.0f / 255.0f, 255.0f / 255.0f, 0.0f);
  // Special handling for the case where the GLJPanel is translucent
  // and wants to be composited with other Java 2D content
  if (GLProfile.isAWTAvailable() && (this instanceof com.jogamp.opengl.awt.GLJPanel)
      && !((com.jogamp.opengl.awt.GLJPanel) this).isOpaque()
      && ((com.jogamp.opengl.awt.GLJPanel) this).shouldPreserveColorBufferIfTranslucent()) {
    gl2.glClear(GL2.GL_DEPTH_BUFFER_BIT);
  } else {
    gl2.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
  }
}
origin: jsettlers/settlers-remake

@Override
public void initSpecific() {
  GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
  caps.setStencilBits(1);
  canvas = new GLJPanel(caps);
  ((GLJPanel)canvas).addGLEventListener(this);
  new GOSwingEventConverter(canvas, parent);
}
com.jogamp.opengl.awtGLJPanel

Most used methods

  • <init>
  • addGLEventListener
  • addMouseListener
  • addMouseMotionListener
  • addMouseWheelListener
  • isOpaque
  • paintComponent
  • setEnabled
  • setFocusable
  • setOpaque
  • shouldPreserveColorBufferIfTranslucent
  • shouldPreserveColorBufferIfTranslucent

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • startActivity (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Path (java.nio.file)
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now