diff --git a/docs/news.dox b/docs/news.dox index 6a776e2d..50b8a483 100644 --- a/docs/news.dox +++ b/docs/news.dox @@ -96,8 +96,8 @@ easier to integrate GLFW into C++ code. @subsection news_30_iconifyfun Window iconification callback -Each window object has a callback for iconification and restoration events, which is -set with @ref glfwSetWindowIconifyCallback. +Each window object has a callback for iconification and restoration events, +which is set with @ref glfwSetWindowIconifyCallback. @subsection news_30_wndposfun Window position callback diff --git a/docs/quick.dox b/docs/quick.dox index e38caa6d..07c5da4e 100644 --- a/docs/quick.dox +++ b/docs/quick.dox @@ -197,14 +197,21 @@ for example pressing the escape key. @section quick_render Rendering with OpenGL Once you have a current OpenGL context, you can use OpenGL normally. In this -tutorial, a multi-colored rotating triangle will be rendered. The window size, -needed here by `glViewport` and `glOrtho`, is retrieved using @ref -glfwGetWindowSize. However, if you only need it for updating the viewport when -the window size changes, you can set a window size callback using @ref -glfwSetWindowSizeCallback and call `glViewport` from there. +tutorial, a multi-colored rotating triangle will be rendered. The framebuffer +size, needed by this example for `glViewport` and `glOrtho`, is retrieved with +@ref glfwGetFramebufferSize. @code -void window_size_callback(GLFWwindow* window, int width, int height) +int width, height; +glfwGetFramebufferSize(window, &width, &height); +glViewport(0, 0, width, height); +@endcode + +However, you can also set a framebuffer size callback using @ref +glfwSetFramebufferSizeCallback and call `glViewport` from there. + +@code +void framebuffer_size_callback(GLFWwindow* window, int width, int height) { glViewport(0, 0, width, height); } diff --git a/docs/window.dox b/docs/window.dox index fb8ea784..1ff02735 100644 --- a/docs/window.dox +++ b/docs/window.dox @@ -327,12 +327,12 @@ currently iconified, whether by the user or with @ref glfwIconifyWindow. The `GLFW_VISIBLE` attribute indicates whether the specified window is currently visible. Window visibility can be controlled with @ref glfwShowWindow and @ref -glfwHideWindow and initial visibility is controlled by the [window hint](@ref -window_hints) with the same name. +glfwHideWindow and initial visibility is controlled by the +[window hint](@ref window_hints) with the same name. The `GLFW_RESIZABLE` attribute indicates whether the specified window is -resizable *by the user*. This is controlled by the [window hint](@ref -window_hints) with the same name. +resizable *by the user*. This is controlled by the +[window hint](@ref window_hints) with the same name. The `GLFW_DECORATED` attribute indicates whether the specified window has decorations such as a border, a close widget, etc. This is controlled by the