Fix `wgpu` leftovers from `wgpu_glyph`
This commit is contained in:
parent
788626357a
commit
c807e4ca70
|
@ -78,8 +78,7 @@ impl<'a, H: BuildHasher> GlyphBrushBuilder<'a, H> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Builds a `GlyphBrush` using the given `wgpu::Device` that can render
|
/// Builds a `GlyphBrush` in the given `glow::Context`.
|
||||||
/// text for texture views with the given `render_format`.
|
|
||||||
pub fn build(self, gl: &glow::Context) -> GlyphBrush<'a, H> {
|
pub fn build(self, gl: &glow::Context) -> GlyphBrush<'a, H> {
|
||||||
GlyphBrush::<H>::new(gl, self.inner)
|
GlyphBrush::<H>::new(gl, self.inner)
|
||||||
}
|
}
|
||||||
|
|
13
src/lib.rs
13
src/lib.rs
|
@ -1,6 +1,6 @@
|
||||||
//! A fast text renderer for [`wgpu`]. Powered by [`glyph_brush`].
|
//! A fast text renderer for [`glow`]. Powered by [`glyph_brush`].
|
||||||
//!
|
//!
|
||||||
//! [`wgpu`]: https://github.com/gfx-rs/wgpu
|
//! [`glow`]: https://github.com/grovesNL/glow
|
||||||
//! [`glyph_brush`]: https://github.com/alexheretic/glyph-brush/tree/master/glyph-brush
|
//! [`glyph_brush`]: https://github.com/alexheretic/glyph-brush/tree/master/glyph-brush
|
||||||
#![deny(unused_results)]
|
#![deny(unused_results)]
|
||||||
mod builder;
|
mod builder;
|
||||||
|
@ -133,8 +133,7 @@ impl<'font, H: BuildHasher> GlyphBrush<'font, H> {
|
||||||
match brush_action {
|
match brush_action {
|
||||||
Ok(_) => break,
|
Ok(_) => break,
|
||||||
Err(BrushError::TextureTooSmall { suggested }) => {
|
Err(BrushError::TextureTooSmall { suggested }) => {
|
||||||
// TODO: Obtain max texture dimensions using `wgpu`
|
// TODO: Obtain max texture dimensions
|
||||||
// This is currently not possible I think. Ask!
|
|
||||||
let max_image_dimension = 2048;
|
let max_image_dimension = 2048;
|
||||||
|
|
||||||
let (new_width, new_height) = if (suggested.0
|
let (new_width, new_height) = if (suggested.0
|
||||||
|
@ -217,8 +216,6 @@ impl<'font, H: BuildHasher> GlyphBrush<'font, H> {
|
||||||
/// Draws all queued sections onto a render target.
|
/// Draws all queued sections onto a render target.
|
||||||
/// See [`queue`](struct.GlyphBrush.html#method.queue).
|
/// See [`queue`](struct.GlyphBrush.html#method.queue).
|
||||||
///
|
///
|
||||||
/// It __does not__ submit the encoder command buffer to the device queue.
|
|
||||||
///
|
|
||||||
/// Trims the cache, see [caching behaviour](#caching-behaviour).
|
/// Trims the cache, see [caching behaviour](#caching-behaviour).
|
||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
|
@ -241,8 +238,6 @@ impl<'font, H: BuildHasher> GlyphBrush<'font, H> {
|
||||||
/// transform (e.g. a projection).
|
/// transform (e.g. a projection).
|
||||||
/// See [`queue`](struct.GlyphBrush.html#method.queue).
|
/// See [`queue`](struct.GlyphBrush.html#method.queue).
|
||||||
///
|
///
|
||||||
/// It __does not__ submit the encoder command buffer to the device queue.
|
|
||||||
///
|
|
||||||
/// Trims the cache, see [caching behaviour](#caching-behaviour).
|
/// Trims the cache, see [caching behaviour](#caching-behaviour).
|
||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
|
@ -264,8 +259,6 @@ impl<'font, H: BuildHasher> GlyphBrush<'font, H> {
|
||||||
/// transform (e.g. a projection) and a scissoring region.
|
/// transform (e.g. a projection) and a scissoring region.
|
||||||
/// See [`queue`](struct.GlyphBrush.html#method.queue).
|
/// See [`queue`](struct.GlyphBrush.html#method.queue).
|
||||||
///
|
///
|
||||||
/// It __does not__ submit the encoder command buffer to the device queue.
|
|
||||||
///
|
|
||||||
/// Trims the cache, see [caching behaviour](#caching-behaviour).
|
/// Trims the cache, see [caching behaviour](#caching-behaviour).
|
||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
|
|
Loading…
Reference in New Issue