GLFWWindow.ixx File
GLFW-based Window implementation. More...
Included Headers
#include <format>
#include <GLFW/glfw3.h>
#include <string>
#include <helios.rendering.RenderTarget>
#include <helios.ext.glfw.window.GLFWWindowConfig>
#include <helios.ext.glfw.window.GLFWWindowUserPointer>
#include <helios.window.Window>
Namespaces Index
| namespace | helios |
| namespace | ext |
|
Platform-specific extensions and backend implementations. More... | |
| namespace | glfw |
|
GLFW-specific implementations. More... | |
| namespace | window |
|
GLFW window management. More... | |
Classes Index
| class | GLFWWindow |
|
An OpenGL focused window implementation using GLFW. More... | |
Description
GLFW-based Window implementation.
File Listing
The file content with the documentation metadata removed is:
19export namespace helios::ext::glfw::window {
29 class GLFWWindow : public helios::window::Window {
54 GLFWWindow(const GLFWWindow&) = delete;
55 GLFWWindow& operator=(const GLFWWindow&) = delete;
60 ~GLFWWindow() override {
61 destroy();
71 explicit GLFWWindow(
72 std::unique_ptr<helios::rendering::RenderTarget> renderTarget,
73 const GLFWWindowConfig& cfg
75 Window(std::move(renderTarget), cfg),
76 frameBufferSizeCallback_(cfg.frameBufferSizeCallback) {
93 logger_.warn("Window already shown.");
97 logger_.info("Calling glfwCreateWindow().");
101 if (aspectRatioDenom_ > 0 && aspectRatioNumer_ > 0) {
102 glfwSetWindowAspectRatio(nativeHandle_, aspectRatioNumer_, aspectRatioDenom_);
106 logger_.error("Failed to create GLFW window");
119 void swapBuffers() const noexcept override {
131 void pollEvents() const noexcept override {
141 void setShouldClose(bool close) override {
151 [[nodiscard]] bool shouldClose() const override {
167 [[nodiscard]] GLFWframebuffersizefun frameBufferSizeCallback() const noexcept {
181 void setFrameBufferSizeCallback(GLFWframebuffersizefun framebufferSizeCallback) noexcept {
194 [[nodiscard]] GLFWwindow* nativeHandle() const noexcept {
222 void setWindowUserPointer(std::unique_ptr<GLFWWindowUserPointer> windowUserPointer) noexcept {
223 windowUserPointer_ = std::move(windowUserPointer);
233 [[nodiscard]] const GLFWWindowUserPointer& windowUserPointer() const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.