How did you determine that was?
Black screen when selecting objects from a sketch
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
- dcapeletti
- Posts: 504
- Joined: Wed Jul 23, 2014 2:27 pm
Re: Black screen when selecting objects from a sketch
On my PC that recently crashed the issue did not appear but the old PC that I re-activated I can confirm the problem.
I have created the ticket issue #4103. Maybe we can find a way to get it reliably working when anti-aliasing is enabled.
I have created the ticket issue #4103. Maybe we can find a way to get it reliably working when anti-aliasing is enabled.
Re: Black screen when selecting objects from a sketch
In the output window you can enable log messages and when doing the rubber band selection this message may appear: QOpenGLFramebufferObject: Unsupported framebuffer format.
The problem is that the combination of multi-sampling and internally requested texture format are not supported by the driver and then the message is printed.
In my case the maximum allowed multi-sampling (GL_MAX_SAMPLES) is even 16 but only 8 is requested by the application but in OpenGL an error is still set. What works for me is to reduce the multi-sampling to 4.
The problem is that the combination of multi-sampling and internally requested texture format are not supported by the driver and then the message is printed.
In my case the maximum allowed multi-sampling (GL_MAX_SAMPLES) is even 16 but only 8 is requested by the application but in OpenGL an error is still set. What works for me is to reduce the multi-sampling to 4.
Re: Black screen when selecting objects from a sketch
That solved the issue for me, no more black screen.
OS: macOS Mojave (10.14)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18213 (Git)
Build type: Release
Branch: master
Hash: 22babc09954ac6fda9135ee71d68550921659b1c
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Switzerland (fr_CH)
But now every line, including the axes turn black after selection :
OS: macOS Mojave (10.14)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18213 (Git)
Build type: Release
Branch: master
Hash: 22babc09954ac6fda9135ee71d68550921659b1c
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Switzerland (fr_CH)
Find your user.cfg and system.cfg files : Macro_findConfigFiles
Imperial system makes no sense, go metric ! ! !
Imperial system makes no sense, go metric ! ! !
Re: Black screen when selecting objects from a sketch
I don't know if a universal fix is possible.
As said above the problem is a combination of the multi-samples and the internal texture format for the framebuffer. So one way to avoid this problem is by decreasing the multi-samples and now with git commit f4bc889b4 it's also possible to change the internal texture format.
Until now the hard-coded value was GL_RGB32F_ARB but it apparently caused problems on older systems. The value GL_RGB32F_ARB once was used because this was (on my old system) the only value where creating an image worked correctly if the model has semi-transparent surfaces. For a model without transparencies the default value works, too.
With the change the default value is not overridden any more and it's the same value used for the real rendering of a QOpenGLWidget. So, I hope that the rubber band selection and saving images works on older systems, too.
If people want/need to override this value then they should open the parameter editor and go to: BaseApp > Preferences > View and create a string of the name InternalTextureFormat. The value should be one of these: Default, GL_RGB, GL_RGBA, GL_RGB8, GL_RGBA8, GL_RGB10, GL_RGB10_A2, GL_RGB16, GL_RGBA16, GL_RGB32F or GL_RGBA32F.
As said above the problem is a combination of the multi-samples and the internal texture format for the framebuffer. So one way to avoid this problem is by decreasing the multi-samples and now with git commit f4bc889b4 it's also possible to change the internal texture format.
Until now the hard-coded value was GL_RGB32F_ARB but it apparently caused problems on older systems. The value GL_RGB32F_ARB once was used because this was (on my old system) the only value where creating an image worked correctly if the model has semi-transparent surfaces. For a model without transparencies the default value works, too.
With the change the default value is not overridden any more and it's the same value used for the real rendering of a QOpenGLWidget. So, I hope that the rubber band selection and saving images works on older systems, too.
If people want/need to override this value then they should open the parameter editor and go to: BaseApp > Preferences > View and create a string of the name InternalTextureFormat. The value should be one of these: Default, GL_RGB, GL_RGBA, GL_RGB8, GL_RGBA8, GL_RGB10, GL_RGB10_A2, GL_RGB16, GL_RGBA16, GL_RGB32F or GL_RGBA32F.
Re: Black screen when selecting objects from a sketch
Thanks for the good news - and of course for the work. I hope that the save image will work here again.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Black screen when selecting objects from a sketch
And it does fix the issue. After more than 2 years I can create images again! Thank you very much!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.