Explorar el Código

Documentation work.

Camilla Berglund hace 12 años
padre
commit
fbfbf3ce07
Se han modificado 3 ficheros con 19 adiciones y 12 borrados
  1. 2 2
      docs/news.dox
  2. 13 6
      docs/quick.dox
  3. 4 4
      docs/window.dox

+ 2 - 2
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

+ 13 - 6
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);
 }

+ 4 - 4
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