#include <GLFW/glfw3.h>
Go to the source code of this file.
|
GLFWwindow * | initialize_window (int width, int height) |
| Initialize GLFW and OpenGL, and create a window. More...
|
|
unsigned int | initialize_vertices () |
| Initialize the vertex array. More...
|
|
unsigned int | initialize_framebuffer (unsigned int *framebuffer, unsigned int *texture_color_buffer, unsigned int texture_width, unsigned int texture_height) |
| Initialize a framebuffer and the associated texture. More...
|
|
void | framebuffer_size_callback (GLFWwindow *window, int width, int height) |
| Callback to adjust the size of the viewport when the window is resized. More...
|
|
◆ framebuffer_size_callback()
void framebuffer_size_callback |
( |
GLFWwindow * |
window, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Callback to adjust the size of the viewport when the window is resized.
- Parameters
-
window | The current window. |
width | The new width. |
height | The new height. |
◆ initialize_framebuffer()
unsigned int initialize_framebuffer |
( |
unsigned int * |
framebuffer, |
|
|
unsigned int * |
texture_color_buffer, |
|
|
unsigned int |
texture_width, |
|
|
unsigned int |
texture_height |
|
) |
| |
Initialize a framebuffer and the associated texture.
- Parameters
-
framebuffer | The framebuffer ID to be initialized. |
texture_color_buffer | The texture ID to be initialized. |
texture_width | The width of the desired texture image. |
texture_height | The height of the desired texture image. |
- Returns
- 0 on success, 1 on failure.
◆ initialize_vertices()
unsigned int initialize_vertices |
( |
| ) |
|
Initialize the vertex array.
This functions defines a simple rectangle containing the whole viewport.
- Returns
- The vertex array object ID.
◆ initialize_window()
GLFWwindow* initialize_window |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
Initialize GLFW and OpenGL, and create a window.
- Parameters
-
width | The width of the window to create. |
height | The height of the window to create. |
- Returns
- A pointer to the newly created GLFW window, or
NULL
on error.