26 #ifdef E3D_BACKEND_OPENGL
29 #elif defined E3D_BACKEND_GLES
30 # include <GLES3/gl3.h>
31 # include <GLES3/gl31.h>
34 #include "eng3d/framebuffer.hpp"
35 #include "eng3d/log.hpp"
38 glGenFramebuffers(1, &
id);
39 glBindFramebuffer(GL_FRAMEBUFFER,
id);
44 glDeleteFramebuffers(1, &
id);
48 glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + index, GL_TEXTURE_2D, texture.
id, 0);
49 if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
54 glBindFramebuffer(GL_FRAMEBUFFER,
id);
void set_texture(int index, const Eng3D::Texture &texture)
std::string translate(const std::string_view str)
void error(const std::string_view category, const std::string_view msg)