Documentation work.

This commit is contained in:
Camilla Berglund 2013-06-05 21:26:40 +02:00
parent 5fd409b679
commit fbfbf3ce07
3 changed files with 19 additions and 12 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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