Questions tagged [glcanvas]

A heavyweight AWT component which provides OpenGL rendering support. This is the primary implementation of an AWT GLDrawable; GLJPanel is provided for compatibility with Swing user interfaces when adding a heavyweight doesn't work either because of Z-ordering or LayoutManager problems.

15 questions
4
votes
1 answer

Taking a screenshot with JOGL

I am looking for a way to screenshot my GLCanvas programmatically without awt Robot. Here is my current setup: Constructor: glcaps = new…
skyguy126
  • 457
  • 1
  • 5
  • 17
2
votes
1 answer

Key Bindings with JOGL GLCanvas (java)

Just curious, how would you use key bindings with the openGL GLCanvas? I understand how to use them with JPanel (which applies to GLPanel) but is it possible to use it with GLCanvas? How would you do it if it is possible? -Dan
Code Doggo
  • 2,146
  • 6
  • 33
  • 58
1
vote
0 answers

SWT application with a GLCanvas not resizing properly

I'm making an application that is some sort of drawing program, and to that end I am attempting to use SWT with a GLCanvas widget in the shell. This is a snippet of it that shows the problem I'm having: shell = new Shell(); GridLayout…
skylights1
  • 11
  • 2
1
vote
1 answer

Java swing JPanel example, GLCanvas error

public class Activator implements BundleActivator { TestFrame testFrame = new TestFrame(); public static JPanel graphPanel; public void start(BundleContext context) throws Exception { graphPanel = cartesianGraphs.getGraphPanel(); …
Merve Kaya
  • 111
  • 7
1
vote
0 answers

JOGL GLCanvas resizing fails after a setVisible() call from another frame

I have a problem with JOGL. I`d like to create two windows. One with a GLCanvas and another one with something else. Every time I call setVisible() of another frame before calling setVisible() of the frame where I added the canvas. When resizing I…
Kanteran
  • 80
  • 8
0
votes
1 answer

How to expand/shrink glcanvas (Jogl) if the user resizes the frame?

I have a glcanvas inside a jpanel with a BorderLayout. The size of the canvas should be dependent on the window size. The initial size is set via glCanvas.setSize(640, 480); And it is added to the panel like…
user11340747
0
votes
0 answers

Compilation failure: [...] cannot access javax.media.opengl.awt.GLCanvas, class file for javax.media.opengl.awt.glcanvas not found

I get a compilation failure when trying to compile code that uses WorldWind for dependencies. Here is a screenshot enter image description here I tried downgrading JOGL, but that did not work. I cannot directly change the format to what works now…
rkp
  • 1
  • 2
0
votes
1 answer

WxPython GLCavans not working on some machine

I'm trying to run this simple (and useless) script on different machines: import wx from wx import glcanvas app = wx.App() frame = wx.Frame(None) glcanvas.GLCanvas(frame) It seems to work (it ends gracefully without errors) on most PCs, but i'm…
Luca
  • 1,270
  • 1
  • 18
  • 34
0
votes
1 answer

Java OpenGL draw textures

I can draw one texture on com.jogamp.opengl.awt.GLCanvas but i want to update texture when bufferedimage changed. I wrote display method like this: public void display(GLAutoDrawable glAutoDrawable) { try { if (gl2 == null)…
Erkan
  • 41
  • 8
0
votes
1 answer

JMenuItem desplaying behind GLCanvas?

I have some problems with the JMenuItem that is displayed behind the GLCanvas. At first time when clicking on the JMenuItem it shows in front of the GLCanvas, but once clicking in the JSplit to stretch it I get this problem. I found that this…
Yacino
  • 645
  • 2
  • 10
  • 32
0
votes
1 answer

JOGL: How can change GLCapabilities of an existing GLCanvas?

How can change GLCapabilities of an existing GLCanvas? I want to do this so that I can change FSAA (antialias) samples without recreating the GLCanvas.
Jire
  • 9,680
  • 14
  • 52
  • 87
0
votes
0 answers

Is it possible to use JOGL GLCanvas on Jtable cells?

I'm trying to create a JTable containing JOGL GLCanvas or GLJPanel on table's cells. I define a custom table cell renderer that inherits from the GLJPanel and call the addGLEventListener to define my custom draw on the display method (for the…
0
votes
0 answers

GLCanvas serializing

In my app I use JOGL lib to work with OpenGL. I need to serialize my implementation of javax.media.opengl.awt.GLCanvas. import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; import javax.media.opengl.glu.GLU; import…
Pablo
  • 161
  • 11
0
votes
1 answer

GLCanvas inside JPanel doesn't work

I am trying to add a GLCanvas with OpenGL-Content to a JPanel. The JPanel is inside a JTabbedPane. But when the GLCanvas is inside the JPanel, the Panel is just grey. When I add the GLCanvas directly into the TabbedPane, everything works fine. Here…
ohoeppner
  • 173
  • 3
  • 10
0
votes
1 answer

JOGL: javax.media.opengl.GLException: AWT-EventQueue-0: Context not current on thread

I'm creating a game with JOGL and I've come across an error which I can't for the life of me figure out. In the game I'm using two GLCanvases (GLJpanels actually), one for the menu and one for the actual game. The idea being that when a game is…
user1870238
  • 447
  • 7
  • 20