|
StapleGL
Header-only C++20 OpenGL wrapper
|
More complex example of staplegl usage with the Utah Teapot model. More...
#include "glad.h"#include "staplegl.hpp"#include <GLFW/glfw3.h>#include <algorithm>#include <array>#include <cstddef>#include <iostream>#include <span>#include <utility>#include "box.h"#include "screen_quad.h"#include "teapot_data.h"#include "glm.hpp"#include "gtc/matrix_transform.hpp"#include "gtc/type_ptr.hpp"#include "stb_image.h"
Go to the source code of this file.
Macros | |
| #define | STAPLEGL_DEBUG |
| #define | STB_IMAGE_IMPLEMENTATION |
| #define | STAPLEGL_TEAPOT_LOW_MSAA |
Functions | |
| void | framebuffer_size_callback (GLFWwindow *window, int width, int height) |
| void | processInput (GLFWwindow *window) |
| void GLAPIENTRY | MessageCallback (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam) |
| constexpr auto | calc_pyramid_levels (uint32_t width, uint32_t height) -> uint32_t |
| auto | main () -> int |
Variables | |
| constexpr auto | MSAA = staplegl::tex_samples::MSAA_X2 |
| constexpr auto | MSAA_SAMPLES = 2 |
| const int32_t | SCR_WIDTH = 1600 |
| const int32_t | SCR_HEIGHT = 900 |
| float | luminosity = 50.0F |
| float | aspect_ratio = static_cast<double>(SCR_WIDTH) / static_cast<double>(SCR_HEIGHT) |
More complex example of staplegl usage with the Utah Teapot model.
Definition in file teapot.cpp.
| #define STAPLEGL_DEBUG |
Definition at line 10 of file teapot.cpp.
| #define STAPLEGL_TEAPOT_LOW_MSAA |
Definition at line 44 of file teapot.cpp.
| #define STB_IMAGE_IMPLEMENTATION |
Definition at line 33 of file teapot.cpp.
|
constexpr |
Definition at line 92 of file teapot.cpp.
| void framebuffer_size_callback | ( | GLFWwindow * | window, |
| int | width, | ||
| int | height | ||
| ) |
Definition at line 614 of file teapot.cpp.
| auto main | ( | ) | -> int |
Definition at line 107 of file teapot.cpp.
| void GLAPIENTRY MessageCallback | ( | GLenum | source, |
| GLenum | type, | ||
| GLuint | id, | ||
| GLenum | severity, | ||
| GLsizei | length, | ||
| const GLchar * | message, | ||
| const void * | userParam | ||
| ) |
Definition at line 67 of file teapot.cpp.
| void processInput | ( | GLFWwindow * | window | ) |
Definition at line 592 of file teapot.cpp.
| float aspect_ratio = static_cast<double>(SCR_WIDTH) / static_cast<double>(SCR_HEIGHT) |
Definition at line 105 of file teapot.cpp.
| float luminosity = 50.0F |
Definition at line 63 of file teapot.cpp.
|
constexpr |
Definition at line 47 of file teapot.cpp.
|
constexpr |
Definition at line 48 of file teapot.cpp.
| const int32_t SCR_HEIGHT = 900 |
Definition at line 60 of file teapot.cpp.
| const int32_t SCR_WIDTH = 1600 |
Definition at line 59 of file teapot.cpp.