Skip to content

tilde35/pgfx_wgpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgfx_wgpu

This is an implementation of pgfx using wgpu.

Disclaimer - Prototype

This is being provided as a prototype library. I am currently developing a game (Penta Terra) and do not have time to fully invest in this. Please feel free to use this concept if you are interesting in building it out.

Setup

Add the following to your dependencies section:

# Core library, include any desired features (glam, image, web-time)
pgfx = { git = "https://github.com/tilde35/pgfx", features = [""]}
# WGPU backend
pgfx_wgpu = { git = "https://github.com/tilde35/pgfx" }

Refer to the examples section for the setup process.

WGPU Specific Data

WgpuSampler

This sampler provides more options beyond what the default sampler allows (such as comparison operations).

RenderPipelineData

During the configuration of the render pipeline, call configure_render_pipeline to get the pre-assembled pipeline configuration. Changes can be made here as long as the pipeline doesn't become invalid due to those changes.

Example:

render_pass
    .run(&pipeline)
    .input(&vbuf)
    // ...
    .execute(|cfg| {
        // ...

        let b = cfg.configure_render_pipeline();
        // Make advanced configuration changes

        Ok(())
    })?;

ComputePipelineData

During the configuration of the compute pipeline, call configure_compute_pipeline to get the pre-assembled pipeline configuration. Changes can be made here as long as the pipeline doesn't become invalid due to those changes.

Example:

compute_pass
    .run(&pipeline)
    .input(&buf0)
    // ...
    .execute(|cfg| {
        // ...

        let b = cfg.configure_compute_pipeline();
        // Make advanced configuration changes

        Ok(())
    })?;

About

Prototype Graphics API using WGPU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages