16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 00:09:19 +02:00

milek7/sim branch opengl 3.3 renderer import

This commit is contained in:
tmj-fstate
2019-10-26 15:17:09 +02:00
parent d24fccb4d7
commit 0fd23a53d9
90 changed files with 7629 additions and 549 deletions

33
gl/framebuffer.h Normal file
View File

@@ -0,0 +1,33 @@
#pragma once
#include "object.h"
#include "bindable.h"
#include "renderbuffer.h"
#include "Texture.h"
#include "cubemap.h"
namespace gl
{
class framebuffer : public object, public bindable<framebuffer>
{
public:
framebuffer();
~framebuffer();
void attach(const opengl_texture &tex, GLenum location);
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);
};
}