File tree Expand file tree Collapse file tree 13 files changed +39
-39
lines changed Expand file tree Collapse file tree 13 files changed +39
-39
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,15 @@ def step( self, dt ):
64
64
# as we patched it out of the idle loop
65
65
self .window .dispatch_event ( 'on_draw' )
66
66
67
+ # display the frame buffer
68
+ self .window .flip ()
69
+
67
70
def on_draw ( self ):
68
71
# clear our frame buffer and depth buffer
69
72
glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT )
70
73
71
74
# render the fps
72
75
self .fps_display .draw ()
73
-
74
- # display the frame buffer
75
- self .window .flip ()
76
76
77
77
78
78
def main ():
Original file line number Diff line number Diff line change @@ -161,6 +161,9 @@ def step( self, dt ):
161
161
# manually dispatch the on_draw event
162
162
# as we patched it out of the idle loop
163
163
self .window .dispatch_event ( 'on_draw' )
164
+
165
+ # display the frame buffer
166
+ self .window .flip ()
164
167
165
168
def on_draw ( self ):
166
169
# render our scene
@@ -171,9 +174,6 @@ def on_draw( self ):
171
174
172
175
# render our help text
173
176
self .help_label .draw ()
174
-
175
- # display the frame buffer
176
- self .window .flip ()
177
177
178
178
def move_camera ( self , dt ):
179
179
# update the Camera
Original file line number Diff line number Diff line change @@ -146,15 +146,15 @@ def step( self, dt ):
146
146
# as we patched it out of the idle loop
147
147
self .window .dispatch_event ( 'on_draw' )
148
148
149
+ # display the frame buffer
150
+ self .window .flip ()
151
+
149
152
def on_draw ( self ):
150
153
self .render ()
151
154
152
155
# render the fps
153
156
self .fps_display .draw ()
154
157
155
- # display the frame buffer
156
- self .window .flip ()
157
-
158
158
def set_gl_state ( self ):
159
159
# enable z buffer
160
160
glEnable ( GL_DEPTH_TEST )
Original file line number Diff line number Diff line change @@ -201,15 +201,15 @@ def step( self, dt ):
201
201
# manually dispatch the on_draw event
202
202
# as we patched it out of the idle loop
203
203
self .window .dispatch_event ( 'on_draw' )
204
+
205
+ # display the frame buffer
206
+ self .window .flip ()
204
207
205
208
def on_draw ( self ):
206
209
self .render ()
207
210
208
211
# render the fps
209
212
self .fps_display .draw ()
210
-
211
- # display the frame buffer
212
- self .window .flip ()
213
213
214
214
def set_gl_state ( self ):
215
215
# enable z buffer
Original file line number Diff line number Diff line change @@ -130,16 +130,16 @@ def step( self, dt ):
130
130
# manually dispatch the on_draw event
131
131
# as we patched it out of the idle loop
132
132
self .window .dispatch_event ( 'on_draw' )
133
+
134
+ # display the frame buffer
135
+ self .window .flip ()
133
136
134
137
def on_draw ( self ):
135
138
# render the scene
136
139
self .render ()
137
140
138
141
# render the fps
139
142
self .fps_display .draw ()
140
-
141
- # display the frame buffer
142
- self .window .flip ()
143
143
144
144
def initialise_mesh ( self ):
145
145
# load the obj mesh from the file
Original file line number Diff line number Diff line change @@ -167,16 +167,16 @@ def step( self, dt ):
167
167
# as we patched it out of the idle loop
168
168
self .window .dispatch_event ( 'on_draw' )
169
169
170
+ # display the frame buffer
171
+ self .window .flip ()
172
+
170
173
def on_draw ( self ):
171
174
# render the scene
172
175
self .render ()
173
176
174
177
# render the fps
175
178
self .fps_display .draw ()
176
179
177
- # display the frame buffer
178
- self .window .flip ()
179
-
180
180
def set_gl_state ( self ):
181
181
# enable z buffer
182
182
glEnable ( GL_DEPTH_TEST )
Original file line number Diff line number Diff line change @@ -131,16 +131,16 @@ def step( self, dt ):
131
131
# as we patched it out of the idle loop
132
132
self .window .dispatch_event ( 'on_draw' )
133
133
134
+ # display the frame buffer
135
+ self .window .flip ()
136
+
134
137
def on_draw ( self ):
135
138
# render the scene
136
139
self .render ()
137
140
138
141
# render the fps
139
142
self .fps_display .draw ()
140
143
141
- # display the frame buffer
142
- self .window .flip ()
143
-
144
144
def set_gl_state ( self ):
145
145
# enable z buffer
146
146
glEnable ( GL_DEPTH_TEST )
Original file line number Diff line number Diff line change @@ -226,6 +226,9 @@ def step( self, dt ):
226
226
# manually dispatch the on_draw event
227
227
# as we patched it out of the idle loop
228
228
self .window .dispatch_event ( 'on_draw' )
229
+
230
+ # display the frame buffer
231
+ self .window .flip ()
229
232
230
233
def on_draw ( self ):
231
234
# render the scene
@@ -236,9 +239,6 @@ def on_draw( self ):
236
239
237
240
# render our help text
238
241
self .help_label .draw ()
239
-
240
- # display the frame buffer
241
- self .window .flip ()
242
242
243
243
def set_gl_state ( self ):
244
244
# enable z buffer
Original file line number Diff line number Diff line change @@ -153,15 +153,15 @@ def step( self, dt ):
153
153
# as we patched it out of the idle loop
154
154
self .window .dispatch_event ( 'on_draw' )
155
155
156
+ # display the frame buffer
157
+ self .window .flip ()
158
+
156
159
def on_draw ( self ):
157
160
self .render ()
158
161
159
162
# render the fps
160
163
self .fps_display .draw ()
161
164
162
- # display the frame buffer
163
- self .window .flip ()
164
-
165
165
def render ( self ):
166
166
#
167
167
# setup
Original file line number Diff line number Diff line change @@ -218,6 +218,9 @@ def step( self, dt ):
218
218
# manually dispatch the on_draw event
219
219
# as we patched it out of the idle loop
220
220
self .window .dispatch_event ( 'on_draw' )
221
+
222
+ # display the frame buffer
223
+ self .window .flip ()
221
224
222
225
def on_draw ( self ):
223
226
# render the scene
@@ -231,9 +234,6 @@ def on_draw( self ):
231
234
232
235
# render our status text
233
236
self .status_label .draw ()
234
-
235
- # display the frame buffer
236
- self .window .flip ()
237
237
238
238
def on_key_event ( self , digital , event , key ):
239
239
if event == Keyboard .up :
Original file line number Diff line number Diff line change @@ -132,15 +132,15 @@ def step( self, dt ):
132
132
# as we patched it out of the idle loop
133
133
self .window .dispatch_event ( 'on_draw' )
134
134
135
+ # display the frame buffer
136
+ self .window .flip ()
137
+
135
138
def on_draw ( self ):
136
139
self .render ()
137
140
138
141
# render the fps
139
142
self .fps_display .draw ()
140
143
141
- # display the frame buffer
142
- self .window .flip ()
143
-
144
144
def set_gl_state ( self ):
145
145
# enable z buffer
146
146
glEnable ( GL_DEPTH_TEST )
Original file line number Diff line number Diff line change @@ -224,6 +224,9 @@ def step( self, dt ):
224
224
# manually dispatch the on_draw event
225
225
# as we patched it out of the idle loop
226
226
self .window .dispatch_event ( 'on_draw' )
227
+
228
+ # display the frame buffer
229
+ self .window .flip ()
227
230
228
231
def on_draw ( self ):
229
232
# render the scene
@@ -234,9 +237,6 @@ def on_draw( self ):
234
237
235
238
# render the fps
236
239
self .fps_display .draw ()
237
-
238
- # display the frame buffer
239
- self .window .flip ()
240
240
241
241
def render ( self ):
242
242
#
Original file line number Diff line number Diff line change @@ -234,6 +234,9 @@ def step( self, dt ):
234
234
# manually dispatch the on_draw event
235
235
# as we patched it out of the idle loop
236
236
self .window .dispatch_event ( 'on_draw' )
237
+
238
+ # display the frame buffer
239
+ self .window .flip ()
237
240
238
241
def on_draw ( self ):
239
242
# render the scene
@@ -249,9 +252,6 @@ def on_draw( self ):
249
252
self .setup_status_text ()
250
253
# render it
251
254
self .status_label .draw ()
252
-
253
- # display the frame buffer
254
- self .window .flip ()
255
255
256
256
def on_key_event ( self , digital , event , key ):
257
257
if event == Keyboard .up :
You can’t perform that action at this time.
0 commit comments