@@ -44,15 +44,15 @@ def draw(self, time, frametime, target):
4444
4545 self .fbo .use ()
4646
47- self .cube_prog1 . uniform ( "m_proj" , proj_m .astype ('f4' ).tobytes ())
48- self .cube_prog1 . uniform ( "m_mv" , mv_m .astype ('f4' ).tobytes ())
49- self .cube_prog1 . uniform ( "m_normal" , normal_m .astype ('f4' ).tobytes ())
47+ self .cube_prog1 [ "m_proj" ]. write ( proj_m .astype ('f4' ).tobytes ())
48+ self .cube_prog1 [ "m_mv" ]. write ( mv_m .astype ('f4' ).tobytes ())
49+ self .cube_prog1 [ "m_normal" ]. write ( normal_m .astype ('f4' ).tobytes ())
5050 self .texture1 .use (location = 0 )
5151 self .texture2 .use (location = 1 )
52- self .cube_prog1 . uniform ( "texture0" , 0 )
53- self .cube_prog1 . uniform ( "texture1" , 1 )
54- self .cube_prog1 . uniform ( "time" , time )
55- self .cube .draw (self .cube_prog1 )
52+ self .cube_prog1 [ "texture0" ]. value = 0
53+ self .cube_prog1 [ "texture1" ]. value = 1
54+ self .cube_prog1 [ "time" ]. value = time
55+ self .cube .render (self .cube_prog1 )
5656
5757 target .use ()
5858
@@ -61,13 +61,13 @@ def draw(self, time, frametime, target):
6161 view_m = self .sys_camera .view_matrix
6262 normal_m = self .create_normal_matrix (view_m )
6363
64- self .cube_prog2 . uniform ( "m_proj" , self .sys_camera .projection .tobytes ())
65- self .cube_prog2 . uniform ( "m_mv" , view_m .astype ('f4' ).tobytes ())
66- self .cube_prog2 . uniform ( "m_normal" , normal_m .astype ('f4' ).tobytes ())
64+ self .cube_prog2 [ "m_proj" ]. write ( self .sys_camera .projection .tobytes ())
65+ self .cube_prog2 [ "m_mv" ]. write ( view_m .astype ('f4' ).tobytes ())
66+ self .cube_prog2 [ "m_normal" ]. write ( normal_m .astype ('f4' ).tobytes ())
6767 self .fbo .color_attachments [0 ].use (location = 0 )
68- self .cube_prog2 . uniform ( "texture0" , 0 )
69- self .cube_prog2 . uniform ( "time" , time )
70- self .cube_prog2 . uniform ( "lightpos" , (0.0 , 0.0 , 0.0 ) )
71- self .points .draw (self .cube_prog2 )
68+ self .cube_prog2 [ "texture0" ]. value = 0
69+ self .cube_prog2 [ "time" ]. value = time
70+ self .cube_prog2 [ "lightpos" ]. value = (0.0 , 0.0 , 0.0 )
71+ self .points .render (self .cube_prog2 )
7272
7373 self .fbo .clear (red = 0.5 , green = 0.5 , blue = 0.5 , alpha = 1.0 , depth = 1.0 )
0 commit comments