Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (546)
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/Vista bug  (Read 3459 times)
0 Members and 1 Guest are viewing this topic.
Offline kaffiene
« Posted 2010-03-05 20:30:41 »

I have a problem with some JOGL code that runs fine on XP but not on Vista.  It's a client/server game arrangement.  When I run the server and client screen on the same computer it works fine on XP but on Vista, I get some sort of 'ghost' window - a window of the same size and name as my rendering window, but completely white.  And on top of that, the server no longer seems to redraw properly (although dumping networked inputs shows that it is still getting updates from the client)

I know this is probably a long shot, but can anyone think of what might cause those duplicate windows to display on Vista?

Offline kaffiene
« Reply #1 - Posted 2010-03-05 20:56:09 »

Recent testing has shown that this actually has nothing to do with the client/server set up.  I've discovered that this duplicate window was also coming up when I run the code in standalone mode which should have one window and no networking. 

I've attached the code I used to establish the frame and link it to JOGL.  If anyone can see anything untoward, I'd appreciate a hand  Smiley


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
    public Renderer(String title){
        frame = new Frame(title);

        game = Game.instance;

        GLCapabilities caps = new GLCapabilities();
        caps.setDoubleBuffered(true);
        caps.setHardwareAccelerated(true);

        canvas = new GLCanvas();

        final float sScale = 0.7f;
        screenWidth  = (int)(sScale * 800);//1280;
       screenHeight = (int)(sScale * 600);//860;

        canvas.addGLEventListener(this);

        frame.setIgnoreRepaint(true);
        frame.setSize(screenWidth, screenHeight);

        gEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
        gDevice      = gEnvironment.getDefaultScreenDevice();

        if(WANT_FULLSCREEN){
            frame.setUndecorated(true);

            oldDisplayMode = gDevice.getDisplayMode();
            displayMode = new DisplayMode(1024, 768, 32, DisplayMode.REFRESH_RATE_UNKNOWN);

            gDevice.setFullScreenWindow(frame);
            gDevice.setDisplayMode(displayMode);
        }

        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                game.stop();
            }
        });

        canvas.addKeyListener(game);
        canvas.addMouseMotionListener(game);
        canvas.addMouseListener(game);
        canvas.addMouseWheelListener(game);

        frame.add(canvas);
        frame.setVisible(true);
    }

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 781
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #2 - Posted 2010-03-06 15:26:59 »

Last time i worked with FSEM in AWT was in the 1.4 era, so this might be a little outdated:

never ever create your own DisplayMode object. Query the existing modes, and pick the one that fits your needs. Back then, it really gave me a lot of problems: even when creating an exact duplicate of a DisplayMode that I queried. So this might sound a bit vague, but it's easy enough to give it a try, and see whether this issue was fixed since Java 1.4.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2010-03-06 18:10:20 »

Last time i worked with FSEM in AWT was in the 1.4 era, so this might be a little outdated:

never ever create your own DisplayMode object. Query the existing modes, and pick the one that fits your needs. Back then, it really gave me a lot of problems: even when creating an exact duplicate of a DisplayMode that I queried. So this might sound a bit vague, but it's easy enough to give it a try, and see whether this issue was fixed since Java 1.4.
Riven is right. Query existing display modes, call GraphicsDevice.getDisplayModes().

Offline kaffiene
« Reply #4 - Posted 2010-03-07 22:03:19 »

Last time i worked with FSEM in AWT was in the 1.4 era, so this might be a little outdated:

never ever create your own DisplayMode object. Query the existing modes, and pick the one that fits your needs. Back then, it really gave me a lot of problems: even when creating an exact duplicate of a DisplayMode that I queried. So this might sound a bit vague, but it's easy enough to give it a try, and see whether this issue was fixed since Java 1.4.

You're right that the code as it stands is not acceptable for general release, but as it happens, I'm not running this in full screen mode (WANT_FULLSCREEN is false in my code at the moment).  I will certainly make that change when I am ready to release, however.

Offline DzzD
« Reply #5 - Posted 2010-03-07 23:08:02 »

you may try to disable "Aero" just to see if it help (this is one of the big difference between XP/Vista).

NB: once tuned Vista just look & work nearly the same as XP ans is also as stable than XP

Offline murderv

Senior Newbie





« Reply #6 - Posted 2010-04-22 01:04:24 »

i have tried to get displaymodes and still i am getting the white screen problem.
my code is just the same as everything, create frame, create glcanvas, set params for frame and canvas, add canvas to frame,
get displaymode, setfullscreenwindow, create and start an animator.

i just no idea what can this be.. i am on windows 7 64bit.. anyone else having white screen problem on fullscreen mode ??
Offline xinaesthetic

Senior Member


Medals: 1



« Reply #7 - Posted 2010-04-22 10:11:11 »

I worked around something very similar by running with "-Dsun.java2d.noddraw=false".  In my case, it worked ok when launched from Eclipse, but exhibited similar problems to yours when running the exported application, until I added that jvm argument.
Offline murderv

Senior Newbie





« Reply #8 - Posted 2010-04-22 16:25:57 »

that still didn't work for me Sad
this is starting to be annoying. i haven't tried on any other OS, still why would i, if this is my dev machine :/

i have no idea on how to fix this..
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 781
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #9 - Posted 2010-04-22 16:53:39 »

Just for the sake of ruling out driver bugs: does it work in LWJGL?

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline murderv

Senior Newbie





« Reply #10 - Posted 2010-04-22 17:17:34 »

I have tested LWJGL Fullscreen example found on their website.. it worked just fine!

Meanwhile does any of you have any simple test of yours using JOGL and fullscreen i could test?
a working example for testing purposes only.

i just can't see what my problem could be and if it is really my code or my machine..

appreciate it,
Offline H05h1

Junior Newbie





« Reply #11 - Posted 2010-04-27 22:43:51 »

Hi!
I'm having the same 'white screen' issue under Vista 32bit. I've tried all known java2d/jogl vm-switches with no success so far (ofcourse u have to use "-Dsun.java2d.noddraw=false" otherwise fullscreen never even starts to work) I have so far not found any real wokring solution for the bug but pinpointed it to be a Nvidia specific problem (have a second ati machine with win 7 64bit where everything works fine).

At least for me it disappears when I disable Aero, wich is ofcourse unacceptable, but at least hints that it has stg to do with the new DWM in Vista AND the NVidia driver. Also if u press alt-tab to minimize the window and the alt-tab it back to fullscreen the white-screen bug disappears and my application renders correctly. Also not to use FBO's seems to help with some driver versions, but with the newest driver version even if u avoid the FBO's completely u have the white-screen bug.

I am currently working on this issue and have the 'feeling' (no real evidence) that it has stg to do with the the order or the timing when doing the initialization of the frame/glcanvas.


Offline murderv

Senior Newbie





« Reply #12 - Posted 2010-04-28 00:15:22 »

I have just tried GLJFrame from joglutils, it can be found at jogl-dev website.
the problem remains. One thing i've noticed is that noe even joglutils uses exclusive modes. it sure sets a fullscreen window, but does not set any special DisplayMode. I believe this is what makes it a *exclusive* fullscreen mode.

Atleast i can say the problem shouldn't be my approach to get exclusive fullscreen modes.

I have been working with JOGL 2.x and tested GLWindow, but that just doesn't seem to do exclusive fullscreen modes. So that doesn't work too.

Hopefully this will be fixed, or atleast someone with better knowledge can help us on this one. I believe lots of people should be getting this problem, it can't just be ignored.
Offline H05h1

Junior Newbie





« Reply #13 - Posted 2010-04-28 22:29:35 »

Ok, I've made some progress on this issue.

I found this blog entry: http://my2iu.blogspot.com/2004/12/jogl-and-resizing-windows.html

... he states: "If I force an extra buffer swap after a reshape, everything does seem to work correctly (the white screen still shows, but it's quickly overwritten during the successive call to display). Perhaps it's a driver problem.".

So I inserted an explicit GLDrawable.swapBuffers() call at the end of my reshape() method in the GLEventlistener and it WORKED! Cheesy I further tested it with a NVIDIA and an ATI card and it seems to work well on both. I'm currently evaluating different driver versions to test if its a stable solution or just another buggy workaround for a specific driver release. Hope this works for u too ...
Offline murderv

Senior Newbie





« Reply #14 - Posted 2010-04-29 00:00:06 »

hi H0,

can you send me an example of your working fullscreen app?
i would love to test it here and see if that works.


i tried what you said and no luck still..

PS. are you setting exclusive fullscreen mode? using setDisplayMode/setFullscreenWindow ?
Offline H05h1

Junior Newbie





« Reply #15 - Posted 2010-05-02 12:44:39 »

Hi!
Sorry, kinda false alarm from my side. Did some extensive testing with the newest drivers and on NVidia the bug reappears even with the "swapbuffers()" workaround wich previously worked around the issue Sad So I guess I'm back to square one ...   

And yes, I'm using fullscreen exclusive mode and explicitly change the resolution. In windowed mode I don' have the white screen problems. Only in FEM.
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.

atombrot (20 views)
2014-08-19 09:29:53

Tekkerue (21 views)
2014-08-16 06:45:27

Tekkerue (21 views)
2014-08-16 06:22:17

Tekkerue (12 views)
2014-08-16 06:20:21

Tekkerue (19 views)
2014-08-16 06:12:11

Rayexar (55 views)
2014-08-11 02:49:23

BurntPizza (37 views)
2014-08-09 21:09:32

BurntPizza (27 views)
2014-08-08 02:01:56

Norakomi (35 views)
2014-08-06 19:49:38

BurntPizza (64 views)
2014-08-03 02:57:17
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!