StapleGL
Header-only C++20 OpenGL wrapper
Loading...
Searching...
No Matches
batches.cpp File Reference

Batched rendering example. More...

#include "glad.h"
#include "staplegl.hpp"
#include <GLFW/glfw3.h>
#include <array>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <execution>
#include <iostream>
#include <optional>
#include <span>
#include <utility>
Include dependency graph for batches.cpp:

Go to the source code of this file.

Classes

struct  vec3
 

Functions

constexpr auto lerp (float a, float b, float f) -> float
 
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)
 
auto main () -> int
 

Variables

const int32_t SCR_WIDTH = 1600
 
const int32_t SCR_HEIGHT = 900
 

Detailed Description

Batched rendering example.

Author
Dario Loi
Date
2023-08-04

Definition in file batches.cpp.

Function Documentation

◆ framebuffer_size_callback()

void framebuffer_size_callback ( GLFWwindow *  window,
int  width,
int  height 
)
Examples
batches.cpp, sandbox.cpp, and teapot.cpp.

Definition at line 246 of file batches.cpp.

◆ lerp()

constexpr auto lerp ( float  a,
float  b,
float  f 
) -> float
constexpr
Examples
batches.cpp.

Definition at line 35 of file batches.cpp.

◆ main()

auto main ( ) -> int
Examples
batches.cpp, sandbox.cpp, and teapot.cpp.

Definition at line 70 of file batches.cpp.

◆ MessageCallback()

void GLAPIENTRY MessageCallback ( GLenum  source,
GLenum  type,
GLuint  id,
GLenum  severity,
GLsizei  length,
const GLchar *  message,
const void *  userParam 
)
Examples
batches.cpp, and teapot.cpp.

Definition at line 50 of file batches.cpp.

◆ processInput()

void processInput ( GLFWwindow *  window)
Examples
batches.cpp, sandbox.cpp, and teapot.cpp.

Definition at line 239 of file batches.cpp.

Variable Documentation

◆ SCR_HEIGHT

const int32_t SCR_HEIGHT = 900
Examples
batches.cpp, sandbox.cpp, and teapot.cpp.

Definition at line 68 of file batches.cpp.

◆ SCR_WIDTH

const int32_t SCR_WIDTH = 1600
Examples
batches.cpp, sandbox.cpp, and teapot.cpp.

Definition at line 67 of file batches.cpp.