Skip to content
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

Give option to chose backend renderer #27

Closed
rustylabs opened this issue May 8, 2023 · 4 comments
Closed

Give option to chose backend renderer #27

rustylabs opened this issue May 8, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@rustylabs
Copy link

And I have a very simple project:

use blue_engine::{header::{Engine, Renderer, ObjectStorage, /*ObjectSettings,*/ WindowDescriptor, PowerPreference}, Window};

fn main()
{
    println!("Hello, world!");

    let mut engine = Engine::new(); // This is where it screws up
}

As soon as I add this line let mut engine = Engine::new(); it "panics" with this error message:

Hello, world!
[2023-05-07T10:19:28Z ERROR wgpu::backend::direct] Handling wgpu errors as fatal by default
thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_texture
      note: label = `Default Texture`
    Downlevel flags VIEW_FORMATS are required but not supported on the device.
This is not an invalid use of WebGPU: the underlying API or device does not support enough features to be a fully compliant implementation. A subset of the features can still be used. If you are running this program on native and not in a browser and wish to work around this issue, call Adapter::downlevel_properties or Device::downlevel_properties to get a listing of the features the current platform supports.

As indicated by these folks

WebGPU added requirement for being able to specify the view format and wgpu checks against that now. Blue engine probably had an older version of wgpu before that didn't have this requirement yet.
That said, the only place where this feature isn't supported is on wgpu's GLES & WebGL backend. On linux you should always use Vulkan whenever possible.
In any case, this would be a bug with blue engine for not picking the correct backend and/or requiring this feature when they also want to suport GLES/WebGL (?, don't know blue engine at all)

Please give option to chose backend renderer for the user!

@ElhamAryanpur ElhamAryanpur added the bug Something isn't working label May 15, 2023
@ElhamAryanpur ElhamAryanpur moved this to In Progress in BlueEngine Workflow May 15, 2023
ElhamAryanpur added a commit that referenced this issue May 15, 2023
@ElhamAryanpur
Copy link
Collaborator

Can you try the new version? try running an example

@rustylabs
Copy link
Author

rustylabs commented May 15, 2023 via email

@ElhamAryanpur
Copy link
Collaborator

use the git for now, and I have also added backends option to WindowDescriptor where you can select a specific backend for our needs. Try that now

@ElhamAryanpur
Copy link
Collaborator

fixed

@github-project-automation github-project-automation bot moved this from In Progress to Done in BlueEngine Workflow May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants