class Espresso::NoCurrentContextError

Overview

Error indicating that GLFW needs an OpenGL context to operate on, but none is currently set on the calling thread.

Ensure a context is current before calling functions that require a current context. This can be done with:

window = Espresso::Window.new(800, 600, "GLFW")
window.current!

or:

Espresso::Window.open(800, 600) do |window|
  # Code that uses the window here.
end

Defined in:

espresso/no_current_context_error.cr

Instance Method Summary

Instance methods inherited from class Espresso::GLFWError

code : LibGLFW::ErrorCode code

Instance Method Detail

def code : LibGLFW::ErrorCode #

Underlying value that represents the error type.


[View source]