1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
use std::vec::Vec;
use std::any::Any;
use interface::i_ele;
use interface::i_component;
pub struct CmdDrawGroupClear ( pub i_component::ComponentDrawGroupClear );
impl CmdDrawGroupClear {
pub fn init( group_id: usize ) -> CmdDrawGroupClear {
CmdDrawGroupClear( i_component::ComponentDrawGroupClear { _group_id: group_id } )
}
}
impl i_ele::IObjImpl for CmdDrawGroupClear {
fn as_any( & self ) -> & Any {
self
}
fn update_components( & mut self, components: & mut Vec< Box< i_component::IComponent > > ) -> Result< (), & 'static str > {
let c = self.0.clone();
components.push( Box::new( c ) );
println!( "loaded command: draw group: clear" );
Ok( () )
}
}
pub struct CmdDrawGroupDependentObjects ( pub i_component::ComponentDrawGroupDependentObjects );
impl CmdDrawGroupDependentObjects {
pub fn init( group_id: usize, obj_ids: &[ usize ] ) -> CmdDrawGroupDependentObjects {
CmdDrawGroupDependentObjects( i_component::ComponentDrawGroupDependentObjects { _group_id: group_id, _obj_ids: obj_ids.to_vec() } )
}
}
impl i_ele::IObjImpl for CmdDrawGroupDependentObjects {
fn as_any( & self ) -> & Any {
self
}
fn update_components( & mut self, components: & mut Vec< Box< i_component::IComponent > > ) -> Result< (), & 'static str > {
let c = self.0.clone();
components.push( Box::new( c ) );
println!( "loaded command: draw group: set objects" );
Ok( () )
}
}
pub struct CmdDrawGroupBind ( pub i_component::ComponentDrawGroupBind );
impl CmdDrawGroupBind {
pub fn init( group_id: usize ) -> CmdDrawGroupBind {
CmdDrawGroupBind( i_component::ComponentDrawGroupBind { _group_id: group_id } )
}
}
impl i_ele::IObjImpl for CmdDrawGroupBind {
fn as_any( & self ) -> & Any {
self
}
fn update_components( & mut self, components: & mut Vec< Box< i_component::IComponent > > ) -> Result< (), & 'static str > {
let c = self.0.clone();
components.push( Box::new( c ) );
println!( "loaded command: draw group: set objects" );
Ok( () )
}
}
pub struct CmdDrawGroupDispatch ( pub i_component::ComponentDrawGroupDispatch );
impl CmdDrawGroupDispatch {
pub fn init( group_id: usize ) -> CmdDrawGroupDispatch {
CmdDrawGroupDispatch( i_component::ComponentDrawGroupDispatch { _group_id: group_id } )
}
}
impl i_ele::IObjImpl for CmdDrawGroupDispatch {
fn as_any( & self ) -> & Any {
self
}
fn update_components( & mut self, components: & mut Vec< Box< i_component::IComponent > > ) -> Result< (), & 'static str > {
let c = self.0.clone();
components.push( Box::new( c ) );
println!( "loaded command: draw group: set objects" );
Ok( () )
}
}
pub struct CmdDrawGroupDependentUniforms ( pub i_component::ComponentDrawGroupDependentUniforms );
impl CmdDrawGroupDependentUniforms {
pub fn init( group_id: usize, uniform_ids: &[ u64 ] ) -> CmdDrawGroupDependentUniforms {
CmdDrawGroupDependentUniforms( i_component::ComponentDrawGroupDependentUniforms { _group_id: group_id, _uniform_ids: uniform_ids.to_vec() } )
}
}
impl i_ele::IObjImpl for CmdDrawGroupDependentUniforms {
fn as_any( & self ) -> & Any {
self
}
fn update_components( & mut self, components: & mut Vec< Box< i_component::IComponent > > ) -> Result< (), & 'static str > {
let c = self.0.clone();
components.push( Box::new( c ) );
println!( "loaded command: draw group: set objects" );
Ok( () )
}
}