Giter VIP home page Giter VIP logo

bevy_pixels's Issues

Possible memory leak on windows.

Noticed I had a very noticable memory leak in my program. Commented everything out except the App::build() and went my way through the systems commenting out each one until the memory leak stopped. It only stopped once .add_plugin(PixelsPlugin) was commented out.

I also tried it in a new and empty project with just the App::build() in it and still got a memory leak.

Here's a github with said empty project https://github.com/BradFitz66/Memory-Leak-Repro/

Is this usable with shaders?

I am still new to shaders and the library Pixels, but currently I'm running my shader pipeline off the encoder from pixels.


let _ = pixels.render_with(|encoder, surface_texture, context| {
                    context
                        .scaling_renderer
                        .render(encoder, &post_process.texture1);

                    post_process.render(encoder, surface_texture);

Are we able to use shaders with this plugin?

Cannot upgrade to bevy 0.14

I gave it a quick try, because it's reaaaally easy -just replace app.world by app.world() and app.world_mut()- but then bevy_pixels stops compiling.

From what I could gather, pixels uses a very old winit (0.28), and for some reason it's OK with bevy 0.13, where you added 0.29 with specific features, but it's no longer the case after moving to bevy 0.14.

There are a lot of compilation errors claiming

...the trait `HasRawDisplayHandle` is not implemented for `WindowWrapper<winit...

Which makes sense, since that it deprecated and HasDisplayHandle should be used instead: https://docs.rs/raw-window-handle/latest/raw_window_handle/trait.HasRawDisplayHandle.html

I'm not entirely sure this is the cause of the conflict, but to me it looks like pixels needs to be updated, so bevy_pixels can also be updated.

I can provide a patch for the version bump, I reverted my local branch to 0.13, but it's really a 5 minute change.

EDIT:
Looks like the story is way more complex:
parasyte/pixels#379
parasyte/pixels#292
there is also raw-window-handle, which is the real reason why pixels can no longer compile, because it's a shared dependency between pixels and winit. So, if winit bumps the version, then pixels needs to bump the version, and bevy_pixels is only working thanks to the workaround on 0.29 that was also used here: parasyte/pixels#379 (comment)

update to bevy 0.6

Hi, I want to start using bevy_pixels, but seems like it has to be updated first.

Timeline for multiple windows support? Any work-around in the meantime?

I noticed that multiple windows support is in the TODO list. My current project has reached the point where I need multiple window support, so I was wondering if that would be coming to this library in the near future.

Either way, is there a better work-around than just rendering the second window through a system unrelated to bevy_pixels?

Thanks for making a useful library!

Need maintenance help?

Hi! ๐Ÿ‘‹ pixels author here.

I noticed this crate uses a very outdated version of the crate. I am interested in pulling this project into the pixels repo so that it stays up-to-date!

@dtcristo If you don't mind transferring the crate name over to me on crates.io, I would be happy to take over.

Basic rendering gives an error

Whenever I try to run the most basic code with bevy_pixels the app crashes.

This is the most basic code that gives this error:

use bevy::prelude::*;
use bevy_pixels::prelude::*;


fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugin(PixelsPlugin)
        .run();
}

What happens is that the application will open and it will show a screen with a white background, but then it will panic. This happens as soon as I add the PixelsPlugin in the main function. Without it there are no problems.

error message:
2022-02-20T17:41:26.114561Z INFO bevy_render::renderer: AdapterInfo { name: "Quadro M1200", vendor: 4318, device: 5046, device_type: DiscreteGpu, backend: Vulkan }
2022-02-20T17:41:26.553636Z ERROR wgpu_hal::vulkan::instance: VALIDATION [NVIDIA (0x0)]
vkCreateSwapchainKHR: internal drawable creation failed
2022-02-20T17:41:26.554363Z ERROR wgpu_hal::vulkan::instance: objects: (type: SWAPCHAIN_KHR, hndl: 0x25e79a54f88, name: ?)
thread 'main' panicked at 'Error in Surface::configure: parent device is lost', C:\Users\mathi.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-0.12.0\src\backend\direct.rs:214:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: process didn't exit successfully: target\debug\raytrace_test.exe (exit code: 101)

Build failure after adding bevy_pixels to project.

I just added this to my Cargo.toml on PopOS Linux:
bevy = { version = "0.6", default_features = false } bevy_pixels = "0.3"

(Swapping in bevy 0.6.1 doesn't change anything.)

The result was this error message:

error: Please select a feature to build for unix: x11, wayland
--> /home/sean/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.1/src/platform_impl/linux/mod.rs:10:1
|
10 | compile_error!("Please select a feature to build for unix: x11, wayland");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is the same problem that this other project is facing: StarArawn/bevy_tiled#65

I modified the bevy dependency as mentioned in that ticket to:
bevy = { version = "0.5", default-features = false, features = ["x11"] }
and everything worked.

Potential fix here, but it presumably won't work well for wayland users: https://github.com/StarArawn/bevy_tiled/pull/66/files

But of course that step shouldn't be required if possible. Could you take a look at how to remove this hiccup from the linux installation process? Thanks!

WASM compatibility?

I'm working on a game that runs on Windows and WASM. It already uses Pixels and Bevy (though not bevy_pixels), but the main loop is managed by Pixels and the glue code I'm using to transfer things like inputs to Bevy is kinda ugly.
I tried using your plugin to get something cleaner, but it doesn't build for the web. So I also tried to implement the Pixels example, but it's a task way too complex for my rust skill level.

Do you think it's something achievable, and if I may ask, would you mind make your plugin compatible with WASM? Thank you :)

Disabling default features still leads to dependency conflict

I am getting the following error when trying to build with this crate:

error: failed to select a version for `web-sys`.
    ... required by package `wgpu v0.12.0`
    ... which satisfies dependency `wgpu = "^0.12.0"` of package `bevy_render v0.7.0`
    ... which satisfies dependency `bevy_render = "^0.7.0"` of package `bevy_core_pipeline v0.7.0`
    ... which satisfies dependency `bevy_core_pipeline = "^0.7.0"` of package `bevy_pbr v0.7.0`
    ... which satisfies dependency `bevy_pbr = "^0.7.0"` of package `bevy_internal v0.7.0`
    ... which satisfies dependency `bevy_internal = "^0.7.0"` of package `bevy v0.7.0`
    ... which satisfies dependency `bevy = "^0.7"` of package `bevy_pixels v0.5.0`
    ... which satisfies dependency `bevy_pixels = "^0.5"` of package `kaminta v0.1.0 (/home/elfein/Projects/kaminta)`
versions that meet the requirements `^0.3.53` are: 0.3.60, 0.3.59, 0.3.58, 0.3.57, 0.3.56, 0.3.55, 0.3.54, 0.3.53

the package `wgpu` depends on `web-sys`, with features: `GpuBufferUsage` but `web-sys` does not have these features.


all possible versions conflict with previously selected packages.

  previously selected package `web-sys v0.3.58`
    ... which satisfies dependency `web-sys = "^0.3.53"` of package `wgpu v0.12.0`
    ... which satisfies dependency `wgpu = "^0.12.0"` of package `bevy_render v0.7.0`
    ... which satisfies dependency `bevy_render = "^0.7.0"` of package `bevy_core_pipeline v0.7.0`
    ... which satisfies dependency `bevy_core_pipeline = "^0.7.0"` of package `bevy_pbr v0.7.0`
    ... which satisfies dependency `bevy_pbr = "^0.7.0"` of package `bevy_internal v0.7.0`
    ... which satisfies dependency `bevy_internal = "^0.7.0"` of package `bevy v0.7.0`
    ... which satisfies dependency `bevy = "^0.7"` of package `bevy_pixels v0.5.0`
    ... which satisfies dependency `bevy_pixels = "^0.5"` of package `kaminta v0.1.0 (/home/elfein/Projects/kaminta)`

failed to select a version for `web-sys` which could resolve this conflict

My dependencies look like so:

[dependencies]
bevy = { version = "0.8", default_features = false }
bevy_pixels = "0.5"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.