17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 08:39:19 +02:00
Files
maszyna/gl/framebuffer.cppm
maj00r b8f040e6fd propagate template headers transitively, import Console where used
AnimModel.cpp reaches cParser through the simulation core, not a direct
import, so the previous pass missed it; the propagation now follows the
whole import closure. Train.cpp, drivermode.cpp and Globals.cpp call
Console:: inside _WIN32 guards without importing eu07.console - invisible
on Linux, where those blocks are skipped.
2026-09-10 01:41:24 +02:00

55 lines
1.4 KiB
C++

module;
#include <array>
#include <chrono>
#include <deque>
#include <limits>
#include <mutex>
#include <ostream>
#include <sstream>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
#include <cstddef>
#include "glad/glad.h"
export module eu07.gl.framebuffer;
import eu07.gl.object;
import eu07.gl.bindable;
import eu07.gl.renderbuffer;
import eu07.model.texture;
import eu07.gl.cubemap;
export {
namespace gl
{
class framebuffer : public object, public bindable<framebuffer>
{
public:
framebuffer();
~framebuffer();
void attach(const opengl_texture &tex, GLenum location);
void attach( const opengl_texture &tex, GLenum location, GLint layer );
void attach(const cubemap &tex, int face, GLenum location);
void attach(const renderbuffer &rb, GLenum location);
void setup_drawing(int attachments);
void detach(GLenum location);
void clear(GLbitfield mask);
bool is_complete();
void blit_to(framebuffer *other, int w, int h, GLbitfield mask, GLenum attachment);
void blit_from(framebuffer *other, int w, int h, GLbitfield mask, GLenum attachment);
static void blit(framebuffer *src, framebuffer *dst, int sx, int sy, int w, int h, GLbitfield mask, GLenum attachment);
using bindable::bind;
static void bind(GLuint id);
};
}
} // export