Discussion:
wxGLCanvas attributes
stepasite
2014-05-07 10:22:48 UTC
Permalink
When no attribList specified (attribList default value is NULL), wxGLCanvas
does not find best available attributes (as one would expect from the
toolkit).

On Windows, there are some default attributes (WX_GL_RBGA,
WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE=16),
but on Linux e.g. depth buffer is set to zero by default.

Not sure about the behavior on MAC OS X yet.

I am ware of wxGLCanvas::IsDisplaySuppported() that allows to check whether
attributes are supported and change (lower) them accordingly to hardware
capabilities. But I would expect that toolkit is able to do this
on its own at least for depth buffer.

Not sure whether this is meaningful for all attributes as hardware and
drivers change quite quickly, but I think having such algorithm for at
least depth buffer would be reasonable.

This is rather enhancement than a real bug.

Thanks in advance,
Pavel
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-05-07 11:59:27 UTC
Permalink
On Wed, 7 May 2014 03:22:48 -0700 (PDT) stepasite wrote:

s> When no attribList specified (attribList default value is NULL), wxGLCanvas
s> does not find best available attributes (as one would expect from the
s> toolkit).

I don't actually know what is expected here, i.e. what are the "best
attributes"? Maybe there is some definition of "best" that everybody would
agree on, but I don't know what is it, do you?

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
stepasite
2014-05-07 12:16:10 UTC
Permalink
I would expect that the best means limits of hardware and OpenGL drivers.

Not sure whether such criteria is applicable to all attributes and whether
not selecting some best values may speed up rendering.

Input of any other person more familiar with the subject would be desired.

Anyway, I am going to look to
javax.media.opengl.DefaultGLCapabilitiesChooser as JOGL seems to do the job
very well.

Thanks,
Pavel
Post by Vadim Zeitlin
s> When no attribList specified (attribList default value is NULL), wxGLCanvas
s> does not find best available attributes (as one would expect from the
s> toolkit).
I don't actually know what is expected here, i.e. what are the "best
attributes"? Maybe there is some definition of "best" that everybody would
agree on, but I don't know what is it, do you?
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-05-07 12:22:33 UTC
Permalink
On Wed, 7 May 2014 05:16:10 -0700 (PDT) stepasite wrote:

s> I would expect that the best means limits of hardware and OpenGL drivers.

I don't think this is the most useful interpretation in practice as this
means that the program will work differently by default on different
machines. IMHO the default should be something that works on 99% (if not
100%) of installations.

s> Not sure whether such criteria is applicable to all attributes and whether
s> not selecting some best values may speed up rendering.
s>
s> Input of any other person more familiar with the subject would be desired.

Yes, indeed.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
stepasite
2014-05-07 15:39:17 UTC
Permalink
s> I don't think this is the most useful interpretation in practice as this
means that the program will work differently by default on different
machines. IMHO the default should be something that works on 99% (if not
100%) of installations.

Yes, the resulting image may differ depending on hardware capabilities.
Most obvious is scene depth for different depth-buffer settings. From
another point of view, such approach may lead to same ugly resulting image
no matter how capable and expensive hardware you got.

--

I could find some related threads already dealing this subject, e.g.:
https://groups.google.com/forum/#!msg/wxpython-users/lbzhzaBNkxQ/R0MHIlMR670J

--

I could also find source already dealing this. Please see the following:

https://github.com/kduske/TrenchBroom/blob/master/Source/Renderer/SharedResources.cpp

It is far away from how selecting attributes really should look like, but
the basic idea is there.

--

Anyway, I can see one possible solution/workaround: having the possibility
to leave PixelFormat/VisualInfo selection and OpenGL context construction
to some external tool and then assign such OpenGL context to wxGLContext
instance.

Thanks,
Pavel
Post by Vadim Zeitlin
s> I would expect that the best means limits of hardware and OpenGL drivers.
I don't think this is the most useful interpretation in practice as this
means that the program will work differently by default on different
machines. IMHO the default should be something that works on 99% (if not
100%) of installations.
s> Not sure whether such criteria is applicable to all attributes and whether
s> not selecting some best values may speed up rendering.
s>
s> Input of any other person more familiar with the subject would be desired.
Yes, indeed.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...