-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fornjot application can crash, if specific graphics features are not supported on target #33
Comments
I've marked this as https://github.com/hannobraun/Fornjot/labels/good%20first%20issue, since it only requires some knowledge of the The code that requests the features lives in fornjot/src/graphics/renderer.rs Lines 55 to 61 in fa4dbc8
This I assume that which features are available would be stored in a field of Here's some drawing code that requires this feature to exist: fornjot/src/graphics/renderer.rs Lines 196 to 211 in fa4dbc8
This code (and potentially other code like it) would need to check the features field of |
As of this writing, the graphics code uses one feature that might not be available everywhere:
wgpu::Features::POLYGON_MODE_LINE
The code just requests that feature. If that features isn't available on the target (where the host application is executed), the host application would either fail with an error message, or even panic. This is not optimal, especially since
POLYGON_MODE_LINE
is only used for an optional drawing mode (rendering the lines of the triangle mesh).Although I haven't seen or heard of any problems regarding this, it would be better to handle these optional features in a more robust way:
Ideally, there would be a nice error message in the UI, to let the user know what the problem is. But for now, it would already be an improvement, if the host application didn't crash if such a feature wasn't available.
The text was updated successfully, but these errors were encountered: