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

An error with the render pipeline on macOS #928

Open
Egeyae opened this issue Jul 15, 2023 · 0 comments
Open

An error with the render pipeline on macOS #928

Egeyae opened this issue Jul 15, 2023 · 0 comments

Comments

@Egeyae
Copy link

Egeyae commented Jul 15, 2023

So I'm using a macOS HighSierra (10.13.6) and encountered an issue while using nannou.
I'm running this:

use nannou::prelude::*;

fn main() {
    nannou::sketch(view).size(500, 500).run();
}

fn view(app: &App, frame: Frame) {
    // get canvas to draw on
    let draw = app.draw();

    // set background to blue
    draw.background().color(BLACK);
    draw.rect()
        .x_y(0.0, 0.0)
        .w_h(100.0, 100.0)
        .color(PLUM);

    // put everything on the frame
    draw.to_frame(app, &frame).unwrap();
}

It compiles without problem but when i run my program it panics with:

thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `nannou render pipeline`
    Internal error in FRAGMENT shader: Metal: Compilation failed: 

program_source:31:29: error: unknown type name 'uint'; did you mean 'int'?
    if (mode == static_cast<uint>(0)) {
                            ^~~~
                            int
program_source:34:33: error: unknown type name 'uint'; did you mean 'int'?
        if (mode == static_cast<uint>(1)) {
                                ^~~~
                                int
program_source:37:37: error: unknown type name 'uint'; did you mean 'int'?
            if (mode == static_cast<uint>(2)) {
                                    ^~~~
                                    int

Maybe it's because I have a too old version of macOS.
The solution I found is to use nannou 0.17.0 but I would like to know if there is any other way.

Moreover, if I remove the draw.rect(), there is no error but an empty window is not that interesting :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant