def frame(): """ Show and update the menu """ # Gui gui.update(window.get_window()) gui.draw_all() # Fps fps.draw()
def DrawGLScene(): global keyIsPressed # Clear The Screen And The Depth Buffer glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) # Reset The View # Draw a square (quadrilateral) fps.update(keyIsPressed) fps.draw() # since this is double buffered, swap the buffers to display what just got drawn. glutSwapBuffers()
def frame(): # Events if events.is_key_down(ord('w')): graph.move_camera_forward(0.2) if events.is_key_down(ord('s')): graph.move_camera_back(0.2) if events.is_key_down(ord('a')): graph.move_camera_right(0.2) if events.is_key_down(ord('d')): graph.move_camera_left(0.2) if events.is_key_down(ord('t')): switch_mouse_lock() # Fps fps.draw() # Cursor cursor.draw()