#2339: wxGUI.Nviz flickering
--------------------+-------------------------------------------------------
Reporter: hcho | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.1.0
Component: wxGUI | Version: svn-trunk
Keywords: Nviz | Platform: Linux
Cpu: x86-64 |
--------------------+-------------------------------------------------------
Hopefully, it's not just me. Today, I tried wxGUI.Nviz for the first time
in GRASS 7 trunk. Rendering is OK when I don't move the image, but
whenever I change the view port, the image flickers. Also, when the
display window is sent back and brought to the front, it flickers again.
Maybe, I'm missing some settings somewhere?
Replying to [comment:2 hcho]:
> Fixed in r61053. Please test it on Windows and Mac.
Works here on Ubuntu. For whatever reason I thought that it is by default
double buffered but apparently not. Just quoting from the documentation to
have it here explained:
''If the attribute list is not specified at all, i.e. if this parameter is
NULL, the default attributes including WX_GL_RGBA and WX_GL_DOUBLEBUFFER
are used. But notice that if you do specify some attributes you also need
to explicitly include these two default attributes in the list if you need
them.''
I will test on Windows but the change for Windows platform (and Mac) was
not necessary because there was no such problem (double buffering was used
by default).
On Windows and Darwin, the attribute list was not specified at all, but on
other platforms including Linux, only WX_GL_DEPTH_SIZE was specified in
the list. Now, WX_GL_DOUBLEBUFFER and WX_GL_DEPTH_SIZE are specified for
all platforms and, effectively, Windows and Darwin are missing WX_GL_RGBA
now according to the above quote. I will test WX_GL_RGBA on Linux and add
it.
I was running nviz on Ubuntu in virtualbox (Windows host) and
interestingly, double buffering causes pretty bad flickering. When I
comment it out in the code, it runs fine. When 3D acceleration is set (in
virtual box), the flickering disappears. But double buffering also causes
that saving image and rendering legend in 3D view produces just black
screen (with or without 3D acceleration). I might add an option to
settings to disable double buffering (at least on Linux).