8 releases
0.3.4 | Feb 11, 2024 |
---|---|
0.3.3 | Dec 17, 2023 |
0.3.1 | Oct 12, 2023 |
0.3.0 | Jul 29, 2023 |
0.1.1 |
|
#612 in Graphics APIs
154 downloads per month
Used in theo
93KB
1.5K
SLoC
piet-wgpu
A piet
implementation based on wgpu
.
License
piet-wgpu
is free software: you can redistribute it and/or modify it under the
terms of either:
- GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- Mozilla Public License as published by the Mozilla Foundation, version 2.
piet-wgpu
is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU Lesser General Public License or the Mozilla Public License
for more details.
You should have received a copy of the GNU Lesser General Public License and the
Mozilla Public License along with piet-wgpu
. If not, see
https://www.gnu.org/licenses/ or https://www.mozilla.org/en-US/MPL/2.0/.
lib.rs
:
A GPU-accelerated 2D graphics backend for piet
that uses the wgpu
crate.
This crate follows the wgpu
middleware pattern, but in a somewhat unique way.
- The user creates the
WgpuContext
by callingnew()
with a device and expected texture format. - Before rendering, the user creates a
RenderContext
by callingprepare()
on theWgpuContext
with aDevice
and aQueue
.prepare()
returns the context, which is expected to be written to. - Finally, by calling
render
on theWgpuContext
, the user renders all of the material that was written to theRenderContext
using thepiet
API.
Dependencies
~21–52MB
~843K SLoC