Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
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 647 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.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (48 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (103 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org 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‑gaming.org
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!