mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-10-29 07:16:05 +03:00
39 lines
874 B
C++
39 lines
874 B
C++
#ifndef GX_GLL_GL_FRAMEBUFFER_H
|
|
#define GX_GLL_GL_FRAMEBUFFER_H
|
|
|
|
#include "gx/gll/GL.h"
|
|
#include "gx/gll/GLObject.h"
|
|
#include <cstdint>
|
|
|
|
#define MAX_ATTACHMENT 6
|
|
|
|
class GLDevice;
|
|
class GLMipmap;
|
|
|
|
class GLFramebuffer : public GLObject {
|
|
public:
|
|
// Static functions
|
|
static GLFramebuffer* Create(bool);
|
|
|
|
// Member variables
|
|
int32_t m_Width = 0;
|
|
int32_t m_Height = 0;
|
|
uint32_t m_FramebufferID = 0;
|
|
GLDevice* m_Device;
|
|
GLMipmap* m_Attachments[6] = {};
|
|
uint32_t m_NumAttach = 0;
|
|
|
|
// Virtual member functions
|
|
virtual void ReleaseObject();
|
|
|
|
// Member functions
|
|
GLFramebuffer(bool);
|
|
void Attach(GLMipmap*, GLenum, int32_t);
|
|
void Detach(GLenum);
|
|
GLMipmap* GetAttachment(GLEnum);
|
|
int32_t GetSampleCount(void);
|
|
bool IsValid();
|
|
};
|
|
|
|
#endif
|