Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (687)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JOGL + Swing app experiencing pauses  (Read 754 times)
0 Members and 1 Guest are viewing this topic.
Offline Kosmon_X

Senior Newbie

Java games rock!

« Posted 2005-03-20 00:01:46 »

Hey, I'm using a JOGL GLCanvas along with a few swing components (mainly just panels and labels). Every frame I'm rendering the canvas and updating the text of 4 different JLabels.  I have a sleep in of 50 ms. I'm not rendering many polygons -- less than 500 in total, and I'm not doing any intensive calculations every frame. The problem is, my program locks up for 2-6 seconds frequently (2-3 times per minute). During this time, the canvas stops rendering and the program stops responding to mouse input.

The lockups occur whenever they want -- sometimes it's right in the middle of the canvas rendering (ie, the background will render but it will freeze before the foreground details finish rendering). I've turned on verbose garbage collecting, and the GC does not correspond to when the pauses occur. Anyone have any ideas what may be causing these frequent lockups?

In addition, the program locks up for several seconds whenever I try to resize or move the window -- I think this has to do with the JOGL canvas resizing perhaps? Is this supposed to happen when you try to move a JOGL canvas?
Offline Ken Russell

JGO Coder

Java games rock!

« Reply #1 - Posted 2005-03-20 00:35:30 »

Do these kind of pauses happen with the JOGL demos, like the Gears demo?

I've seen problems like this on ATI cards in earlier releases of JOGL and they seemed to be caused by the fact that JOGL used to try to perform OpenGL rendering on multiple threads. With 1.1 b10 the threading model was changed so that all of the GLEventListener callbacks are executed on one thread. This solved basically all of the known issues on all platforms (there was at least one bug on each of Mac OS X, Windows and Linux fixed by this change).

If the problems only appear in your application I would try using the DebugGL pipeline or inspect your code to see whether you're trying to use the GL object outside of your GLEventListener's callbacks. The OpenGL context is only current when your display(), init(), etc. methods are called and at no other time in your program.
Offline Kosmon_X

Senior Newbie

Java games rock!

« Reply #2 - Posted 2005-03-20 01:39:55 »

Ah yeah... The lockups occur while running the Gears demo as well. I suppose that is the problem then -- I am using an ATI card. I guess the solution then would be to update my version of JOGL? Thanks Smiley

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Dwinin (73 views)
2015-11-07 13:29:08

Rems19 (81 views)
2015-10-31 01:36:56

Rems19 (78 views)
2015-10-31 01:32:37

williamwoles (107 views)
2015-10-23 10:42:59

williamwoles (93 views)
2015-10-23 10:42:45

Jervac_ (111 views)
2015-10-18 23:29:12

DarkCart (135 views)
2015-10-16 00:58:11

KaiHH (117 views)
2015-10-11 14:10:14

KaiHH (157 views)
2015-10-11 13:26:18

BurntPizza (172 views)
2015-10-08 03:11:46
Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48

Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!