Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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  
  Help: gl call in key listener generates exceptions  (Read 906 times)
0 Members and 1 Guest are viewing this topic.
Offline zhaoyoubing

Senior Newbie




Java games rock!


« Posted 2004-04-19 00:42:13 »

Hi, all:
I'm using JOGL, but met a big problem: I can make gl calls in event handling functions(keyPressed or mouseClicked), and gl call (e.g. glEnable) will generate native code exceptions like following:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4D356998
Function=glEnable+0x0
Library=/usr/lib/libGL.so.1

Current Java thread:
     at net.java.games.jogl.impl.x11.X11GLImpl.glEnable(Native Method)
     at vis.VRenderer.saveContent(VRenderer.java:259)
     at vis.VRenderer.keyPressed(VRenderer.java:290)
     at java.awt.Component.processKeyEvent(Component.java:5058)
     at java.awt.Component.processEvent(Component.java:4909)
     at java.awt.Component.dispatchEventImpl(Component.java:3615)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713)
.....

The platform is Debian GNU/Linux + nvidia driver
I'v tested on other non-nvidia windows platform and that's O.K.

I don't know if there is anyone who can drop me a suggestion to this problem.

Thanx!
Offline milvich

Senior Newbie




Java games rock!


« Reply #1 - Posted 2004-04-19 01:24:48 »

The gl context is only active during the display/init methods. You need to save the information about the events and tell your GLDrawable to redraw. Then during the display callback you can respond to those events and use the gl functions.
Offline zhaoyoubing

Senior Newbie




Java games rock!


« Reply #2 - Posted 2004-04-19 01:33:14 »

Thank u very much!

I also found that the problem may relate to Animator, when I removed Animator I found exceptions does not occur again.
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.

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

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

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (28 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (27 views)
2014-11-24 19:59:16

trollwarrior1 (40 views)
2014-11-22 12:13:56

xFryIx (78 views)
2014-11-13 12:34:49

digdugdiggy (56 views)
2014-11-12 21:11:50
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!