Module: Engine::Debugging
- Defined in:
- lib/engine/debugging.rb
Class Method Summary collapse
-
.breakpoint(&block) ⇒ Object
Hit a breakpoint within the context of where the breakpoint is defined, assuming a block is passed with a
binding.pry(or an alternative debugger), otherwise hit a breakpoint within this method. - .debug_opengl_call ⇒ Object
- .print_opengl_version ⇒ Object
Class Method Details
.breakpoint(&block) ⇒ Object
Hit a breakpoint within the context of where the breakpoint is defined, assuming a block is passed with a binding.pry (or an alternative debugger), otherwise hit a breakpoint within this method.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/engine/debugging.rb', line 8 def self.breakpoint(&block) orig_fullscreen = Window.full_screen? if orig_fullscreen Window.set_to_windowed GLFW.PollEvents # Required to trigger the switch from fullscreen to windowed within this breakpoint end orig_cursor_mode = Cursor.get_input_mode Cursor.enable block_given? ? yield : binding.pry Cursor.restore_input_mode(orig_cursor_mode) Window.set_to_full_screen if orig_fullscreen Window.focus_window # Reset the time, otherwise delta_time will be off for the next frame, and teleporting occurs @time = Time.now end |