Skip to content

v0.12.0

Choose a tag to compare

@mrizaln mrizaln released this 01 Dec 17:48
· 56 commits to main since this release
v0.12.0
2cc4e7f

What's Changed

Full Changelog: v0.11.0...v0.12.0

Added

  • New Instance::create_window function, replacing WindowManager::create_window.
  • New Instance::set_event_interceptor function, replacing WindowManager::set_event_interceptor.
  • New Instance::has_window_opened function, replacing WindowManager::has_window_opened.
  • New Instance::poll_events function, replacing WindowManager::poll_events.
  • New Instance::wait_events function, replacing WindowManager::wait_events.
  • New Instance::set_error_callback function for setting error callback.
  • New Window::set_resizable function that corresponds to setting resizable attribute.
  • New Window::set_floating function that corresponds to setting floating attribute.
  • New Window::set_auto_iconify function that corresponds to setting auto-iconify attribute.
  • New Window::set_focus_on_show function that corresponds to setting focus-on-show attribute.
  • New Window::set_decorated function that corresponds to setting decorated attribute.
  • New Window::set_mouse_passthrough function that corresponds to setting decorated attribute.
  • New apply_hints, apply_hints_full, and apply_hints_default for setting window creation hints.
  • New make_current and get_current function for context management replacing Window::bind and Window::unbind
  • New get_proc_address function for getting OpenGL functions (wrapping glfwGetProcAddress function).
  • New extension_supported function for checking OpenGL extension function existence.
  • New event_name function that gets the name of an event.
  • New structs for window creation hints: hint::Window, hint::Frambuffer, hint::Monitor, hint::Win32, hint::Cocoa, hint::Wayland, hint::X11, Hints, PartialHints, FullHints.
  • New enums for GLFW initialization hints: hint::Platform, hint::AnglePlatform, hint::WaylandLibdecor, InitHints.
  • New enums for context hints: gl::CreationApi, gl::Robustness, gl::ReleaseBehavior.
  • New window attributes: decorated, transparent_framebuffer, mouse_passthrough.
  • Add GLFW constants for GLFW_DONT_CARE and GLFW_ANY_POSITION in its own namespace, constants.
  • Emscripten support using contrib.glfw3 port.
  • Emscripten example.

Fixed

  • Missing #ifdef block and enumeration for error codes.
  • Queued tasks not flushed before destruction.
  • Add missing NoError enumerator that represents GLFW_NO_ERROR on ErrorCode enum.

Changed

  • Headers guards now use a fixed pattern instead of using random letters.
  • Change the signature for init to void init(const InitHint&) to allow for setting initialization hint.
  • Window creation hints can be set like in GLFW, not passed in as argument each time to window creation function, through apply_hints* functions.
  • Move gl namespace to outside of api namespace.
  • Move helper.hpp and imgui.hpp headers to top level include.
  • Move the window creation and events polling from WindowManager to Instance.
  • Move error classes into its new error namespace: .
  • ImGUI functionalities now lives in imgui namespace instead of extra.
  • Remove extra::ImguiInterceptor class and replace the functionality with imgui::ImguiHandle::process_events function, making events handling explicit for ImGUI.
  • Remove logger and replace it with error callback instead.
  • Remove logger enumeration, LogLevel, since it is not necessary with the removal of general logging.
  • Remove the constraint of having only one kind of client context API for all windows.
  • Rename Window::poll to Window::swap_events.
  • Rename Window::display to Window::swap_buffers.
  • Rename Window::is_vsync_enabled to Window::is_vsync making it shorter.
  • Separate window's Attribute from Properties.
  • User-defined literal _fps now is constexpr.
  • ErrorCode enumerators for glfw-cpp errors changed from 0x0002000X to 0x000F000X.

Removed

  • WindowManager class as it is not necessary (refer to Issue #6).
  • Instance::create_window_manager function.
  • Instance::set_logger function.
  • Window::bind and Window::unbind functions for context management.
  • Window::toggle_vsync and Window::toggle_capture_mouse function since I deemed it redundant with the existence of Window::is_vsync and Window::is_mouse_captured function.
  • Flag enum for window hints and its bitwise operators helper.