131 unsigned int fbo = 0;
132 unsigned int rbo = 0;
134 bool debug_is_msaa =
false;
202 std::shared_ptr<FrameBuffer>
fbo;
#define DEBUG_LABEL_ARG_MANY
first debug label argument of many
std::shared_ptr< FrameBuffer > build_msaa_framebuffer(DEBUG_LABEL_ARG_MANY const Size &size, int msaa_samples, ColorBitsPerPixel bits_per_pixel)
Builds a multisample anti-aliasing (MSAA) framebuffer for high-quality rendering.
std::shared_ptr< FrameBuffer > build_simple_framebuffer(DEBUG_LABEL_ARG_MANY const Size &size)
Build a simple LDR frame buffer.
void resolve_multisampled_buffer(const FrameBuffer &src, FrameBuffer *dst)
SingleColor
A single color in a format to load directly into open gl texture(ABGR on little endian).
std::shared_ptr< FrameBuffer > build_hdr_floating_framebuffer(DEBUG_LABEL_ARG_MANY const Size &size, ColorBitsPerPixel bits_per_pixel)
Build a HDR frame buffer.
ColorBitsPerPixel
The number of bits/pixel to use for the color buffer.
std::shared_ptr< FrameBuffer > build_shadow_framebuffer(DEBUG_LABEL_ARG_MANY const Size &size)
Create a depth-only framebuffer for shadow rendering.
TextureCubemap load_cubemap_from_color(DEBUG_LABEL_ARG_MANY SingleColor pixel, ColorData cd)
DepthBits
The number of bits to use for the depth buffer.
constexpr std::size_t cubemap_size
0=right(x+), 1=left(x-), 2=top(y+), 3=bottom(y-), 4=front(z+), 5=back(z-)
constexpr SingleColor color_from_rgba(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Constructs a SingleColor value from individual red, green, blue, and alpha components.
Texture2d load_image_from_color(DEBUG_LABEL_ARG_MANY SingleColor pixel, TextureEdge te, TextureRenderStyle trs, Transparency t, ColorData cd)
@ non_color_data
Don't apply transformations to the color data. Texture is a normal/roughness/ao/specular map or simil...
@ color_data
Apply transformations to the color data. Texture is a diffuse/albedo map, created with human eyes on ...
@ dont_care
Explicitly don't care about the color data but same as non_color_data.
A (inclusive) range between two values.
Base class for all textures, but only exist due to code reuse and can easily be inlined.
BaseTexture(const BaseTexture &)=delete
BaseTexture(BaseTexture &&) noexcept
void operator=(const BaseTexture &)=delete
void unload()
clears the loaded texture to a invalid texture
raii class to render to a FrameBuffer
BoundFbo(const BoundFbo &)=delete
BoundFbo(BoundFbo &&)=delete
void operator=(BoundFbo &&)=delete
std::shared_ptr< FrameBuffer > fbo
void operator=(const BoundFbo &)=delete
BoundFbo(std::shared_ptr< FrameBuffer > f)
"render to texture" feature
FrameBuffer(const FrameBuffer &)=delete
FrameBuffer(unsigned int f, const Size &s)
FrameBuffer(FrameBuffer &&)=delete
void operator=(FrameBuffer &&)=delete
void operator=(const FrameBuffer &)=delete
Texture2d(DEBUG_LABEL_ARG_MANY const void *pixel_data, unsigned int pixel_format, int w, int h, TextureEdge te, TextureRenderStyle trs, Transparency t, ColorData cd)
"internal"
TextureCubemap(DEBUG_LABEL_ARG_MANY const std::array< void *, cubemap_size > &pixel_data, int width, int height, ColorData cd)