2008/12/28 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
What happens if you add
-Dsun.awt.noerasebackground=true
- M.
Post generated using Mail2Forum (mail2forum.com)
2008/12/28 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
What happens if you add
-Dsun.awt.noerasebackground=true
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
Thus spake “Michael Kiefte”:
If I uncomment canvas.display() at the end of mousePressed(), I only
get
flicker on a click instead of the whole window going grey. That’s an
improvement, but it shouldn’t repaint the window on a click at all.Does it flicker when you release?
No, it never flickers on release, only on press.
What happens if you add
-Dsun.awt.noerasebackground=true
I get worse flickering and sometimes garbage during the flickering.
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
Was out all day. New class did the trick, looks fine now
From: Michael Kiefte mkiefte@dal.ca
To: VASSAL Engine Forums Mailing List messages@forums.vassalengine.org
Sent: Sunday, December 28, 2008 3:43:41 PM
Subject: Re: [Developers]Re: JOGL Texture Demo: one more time
Put a new version up here:
http://myweb.dal.ca/mkiefte/TextureDemo081228.zip
This might solve Tim’s antialiasing problem.
Tim, you only need to download and substitute this file:
http://myweb.dal.ca/mkiefte/TextureDemo.class
2008/12/28 Michael Kiefte <mkiefte@dal.ca (mkiefte@dal.ca)>
It’s antialiased inside the texture, but the edges aren’t?
This is what I have on mine (I don’t have a hardware accelerated video card – just a mobile Intel):
http://myweb.dal.ca/mkiefte/Screenshot-TextureDemo.png
I can solve the edges part by simply adding a black border around the map.
- M.
2008/12/28 Tim M <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>
Ran it on my laptop (Vista32). Very smooth and quick. Only thing I noticed was anti-aliasing is not on/enabled?, jagged edges were evident on rotation along map edge. Video card is set to application controlled currently
Tim
Post generated using Mail2Forum (mail2forum.com)
I get worse flickering and sometimes garbage during the flickering.
What does your cursor normally do when you click on a window? Does it do something funky?
Post generated using Mail2Forum (mail2forum.com)
Okay good. That problem is solved.
2008/12/28 Timothy Mccarron <timothy.mccarron@sbcglobal.net (timothy.mccarron@sbcglobal.net)>
Was out all day. New class did the trick, looks fine now
From: Michael Kiefte <mkiefte@dal.ca (mkiefte@dal.ca)>
To: VASSAL Engine Forums Mailing List <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>
Sent: Sunday, December 28, 2008 3:43:41 PM
Subject: Re: [Developers]Re: JOGL Texture Demo: one more timePut a new version up here:
http://myweb.dal.ca/mkiefte/TextureDemo081228.zip
This might solve Tim’s antialiasing problem.
Tim, you only need to download and substitute this file:
http://myweb.dal.ca/mkiefte/TextureDemo.class
- M.
2008/12/28 Michael Kiefte <mkiefte@dal.ca (mkiefte@dal.ca)>
It’s antialiased inside the texture, but the edges aren’t?
This is what I have on mine (I don’t have a hardware accelerated video card – just a mobile Intel):
http://myweb.dal.ca/mkiefte/Screenshot-TextureDemo.png
I can solve the edges part by simply adding a black border around the map.
- M.
2008/12/28 Tim M <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>
Ran it on my laptop (Vista32). Very smooth and quick. Only thing I noticed was anti-aliasing is not on/enabled?, jagged edges were evident on rotation along map edge. Video card is set to application controlled currently
Tim
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
I get worse flickering and sometimes garbage during the flickering.
What does your cursor normally do when you click on a window? Does it do
something funky?
The only thing which happens for other windows is that they gain focus if
they didn’t already have it.
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
One more question:
When you added -Dsun.awt.noerasebackground=true
does it ever show what it’s supposed to or is it always garbage?
2008/12/29 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
Thus spake “Michael Kiefte”:
I get worse flickering and sometimes garbage during the flickering.
What does your cursor normally do when you click on a window? Does it do
something funky?The only thing which happens for other windows is that they gain focus if
they didn’t already have it.–
J.
Post generated using Mail2Forum (mail2forum.com)
Also, how do these demos look to you in Compiz:
https://jogl-demos.dev.java.net/
In particular, try the gears and rotate them with the mouse.
2008/12/29 Michael Kiefte <mkiefte@dal.ca (mkiefte@dal.ca)>
One more question:
When you added -Dsun.awt.noerasebackground=true
does it ever show what it’s supposed to or is it always garbage?
- M.
2008/12/29 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
Thus spake “Michael Kiefte”:
I get worse flickering and sometimes garbage during the flickering.
What does your cursor normally do when you click on a window? Does it do
something funky?The only thing which happens for other windows is that they gain focus if
they didn’t already have it.–
J.
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
One more question:
When you added -Dsun.awt.noerasebackground=true
does it ever show what it’s supposed to or is it always garbage?
It’s garbage until the map is loaded, and then similar garbage briefly
flickers in on each mouse button press. The rest of the time it looks
the way it should. Would you like a screenshot of the garbage?
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
Also, how do these demos look to you in Compiz:
In particular, try the gears and rotate them with the mouse.
The gears flicker also whenever I do a mouse press.
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
It’s garbage until the map is loaded, and then similar garbage briefly
flickers in on each mouse button press. The rest of the time it looks
the way it should. Would you like a screenshot of the garbage?
Would it help?
For some reason, Compiz is compelled to clear the canvas more often. I’ll work on a possible solution today.
Let me know how the gears demo goes. I suspect it will have the same problem, but if it doesn’t, then I’ll check its source.
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
It’s garbage until the map is loaded, and then similar garbage briefly
flickers in on each mouse button press. The rest of the time it looks
the way it should. Would you like a screenshot of the garbage?Would it help?
No, I just thought you might like screenshots of garbage.
For some reason, Compiz is compelled to clear the canvas more often. I’ll
work on a possible solution today.Let me know how the gears demo goes. I suspect it will have the same
problem, but if it doesn’t, then I’ll check its source.
Already have. It flickers on mouse presses too.
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
It’s garbage until the map is loaded, and then similar garbage briefly
flickers in on each mouse button press. The rest of the time it looks
the way it should. Would you like a screenshot of the garbage?Would it help?
For some reason, Compiz is compelled to clear the canvas more often. I’ll
work on a possible solution today.Let me know how the gears demo goes. I suspect it will have the same
problem, but if it doesn’t, then I’ll check its source.
I discovered something just now: The flicker seems to be caused by the
background being painted without the foreground also being painted. I
can see this clearly if I call setBackground(Color.GREEN) on the canvas,
as the flickering becomes bright green.
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
This is a longshot:
-Dsun.java2d.noddraw=true
2008/12/29 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
Thus spake “Michael Kiefte”:
It’s garbage until the map is loaded, and then similar garbage briefly
flickers in on each mouse button press. The rest of the time it looks
the way it should. Would you like a screenshot of the garbage?Would it help?
For some reason, Compiz is compelled to clear the canvas more often. I’ll
work on a possible solution today.Let me know how the gears demo goes. I suspect it will have the same
problem, but if it doesn’t, then I’ll check its source.I discovered something just now: The flicker seems to be caused by the
background being painted without the foreground also being painted. I
can see this clearly if I call setBackground(Color.GREEN) on the canvas,
as the flickering becomes bright green.–
J.
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
This is a longshot:
-Dsun.java2d.noddraw=true
- M.
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
2008/12/29 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
Thus spake “Michael Kiefte”:
This is a longshot:
-Dsun.java2d.noddraw=true
- M.
That makes the flickering black instead of grey.
That’s not what I expected. What happens if you change the background alpha to 0x00? I’m guessing you get the garbage back. And then I would try the 0x00 alpha with the -Dsun.java2d.noddraw=true switch.
Any ideas of what method gets the background colour? paint() and update() are already overridden in GLCanvas. What else is there?
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
That makes the flickering black instead of grey.
That’s not what I expected. What happens if you change the background alpha
to 0x00? I’m guessing you get the garbage back. And then I would try the
0x00 alpha with the -Dsun.java2d.noddraw=true switch.
In both cases, the alpha component is ignored—when I set the background
to Color(255,0,0,0) I see pure red. I think this is because heavyweight
components are always opaque.
Any ideas of what method gets the background colour? paint() and update()
are already overridden in GLCanvas. What else is there?
I’ve been looking at the source for GLCanvas, and all paint() does is call
display(), which in turn seems only to call GLEventListener.display().
So, I’m not sure where the background is actually painted—something called
from TextureDemo.display() must be doing it, since I don’t see any calls to
super.paint() anywhere.
–
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
Here’s another longshot:
-Dsun.java2d.opengl.fbobject=false
The desktop manager is clearing your window without calling a Java method at all. When you have direct draw enabled, setting the background colour calls a native method that sets the background colour for the window. When you added -Dsun.java2d.noddraw=true, the desktop no longer knew what the correct background colour was according to the JVM.
Now the problem is, why would the desktop clear without calling a repaint?
2008/12/29 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
Thus spake “Michael Kiefte”:
That makes the flickering black instead of grey.
That’s not what I expected. What happens if you change the background alpha
to 0x00? I’m guessing you get the garbage back. And then I would try the
0x00 alpha with the -Dsun.java2d.noddraw=true switch.In both cases, the alpha component is ignored—when I set the background
to Color(255,0,0,0) I see pure red. I think this is because heavyweight
components are always opaque.Any ideas of what method gets the background colour? paint() and update()
are already overridden in GLCanvas. What else is there?I’ve been looking at the source for GLCanvas, and all paint() does is call
display(), which in turn seems only to call GLEventListener.display().So, I’m not sure where the background is actually painted—something called
from TextureDemo.display() must be doing it, since I don’t see any calls to
super.paint() anywhere.–
J.
Post generated using Mail2Forum (mail2forum.com)
Thus spake “Michael Kiefte”:
Here’s another longshot:
-Dsun.java2d.opengl.fbobject=false
J.
Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org
Post generated using Mail2Forum (mail2forum.com)
I actually expected it to degrade performance…
It turns out that there are a lot of posts on this on the Internet, but no solution. Do a google search for compiz and jogl and you’ll see the same problem described by multiple people.
2009/1/2 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>
Thus spake “Michael Kiefte”:
Here’s another longshot:
-Dsun.java2d.opengl.fbobject=false
That doesn’t help. It also degrades performance noticeably.
–
J.
Post generated using Mail2Forum (mail2forum.com)