@@ -29,13 +29,12 @@ use crate::{
2929 Flush ,
3030 error:: { ProcessingError , Result } ,
3131 image:: { Image , bytes_to_pixels, create_readback_buffer, pixel_size, pixels_to_bytes} ,
32- render:: {
33- RenderState ,
34- command:: { CommandBuffer , DrawCommand } ,
35- } ,
32+ render:: { RenderState , command:: DrawCommand } ,
3633 surface:: Surface ,
3734} ;
3835
36+ use processing_utils:: CommandBuffer ;
37+
3938pub struct GraphicsPlugin ;
4039
4140impl Plugin for GraphicsPlugin {
@@ -242,8 +241,8 @@ pub fn create(
242241 } ) ,
243242 Transform :: from_xyz ( 0.0 , 0.0 , 999.9 ) ,
244243 render_layer,
245- CommandBuffer :: new ( ) ,
246- RenderState :: new ( ) ,
244+ CommandBuffer :: < DrawCommand > :: new ( ) ,
245+ RenderState :: default ( ) ,
247246 SurfaceSize ( width, height) ,
248247 Graphics {
249248 readback_buffer,
@@ -465,7 +464,7 @@ pub fn end_draw(app: &mut App, entity: Entity) -> Result<()> {
465464
466465pub fn record_command (
467466 In ( ( graphics_entity, cmd) ) : In < ( Entity , DrawCommand ) > ,
468- mut graphics_query : Query < & mut CommandBuffer > ,
467+ mut graphics_query : Query < & mut CommandBuffer < DrawCommand > > ,
469468) -> Result < ( ) > {
470469 let mut command_buffer = graphics_query
471470 . get_mut ( graphics_entity)
0 commit comments