class Espresso::NoCurrentContextError
- Espresso::NoCurrentContextError
- Espresso::GLFWError
- Exception
- Reference
- Object
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/errors/no_current_context_error.crInstance Method Summary
-
#code : LibGLFW::ErrorCode
Underlying value that represents the error type.