gfx_text icon indicating copy to clipboard operation
gfx_text copied to clipboard

Basic usage exampe not compiling

Open joelwkall opened this issue 8 years ago • 0 comments

I can't make basic usage example in the Readme.md compile. The example says:

// Initialize text renderer.
let mut text = gfx_text::new(factory).build().unwrap();

// In render loop:

// Add some text 10 pixels down and right from the top left screen corner.
text.add(
    "The quick brown fox jumps over the lazy dog",  // Text to add
    [10, 10],                                       // Position
    [0.65, 0.16, 0.16, 1.0],                        // Text color
);

// Draw text.
text.draw(&mut stream);

But there is no method draw on Renderer that takes a stream as a parameter, there is only

fn draw<C: CommandBuffer<R>>(&mut self, encoder: &mut Encoder<R, C>, target: &RenderTargetView<R, Rgba8>) -> Result<(), Error>

joelwkall avatar Jun 27 '16 10:06 joelwkall