1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-03 04:53:35 +00:00
lovr/src/graphics/canvas.h

26 lines
622 B
C
Raw Normal View History

2017-12-07 07:50:52 +00:00
#include "graphics/texture.h"
#include "util.h"
typedef enum {
CANVAS_3D,
CANVAS_2D
} CanvasType;
typedef struct {
Texture texture;
CanvasType type;
GLuint framebuffer;
GLuint resolveFramebuffer;
GLuint depthStencilBuffer;
2017-12-07 07:50:52 +00:00
GLuint msaaTexture;
int msaa;
} Canvas;
bool lovrCanvasSupportsFormat(TextureFormat format);
Canvas* lovrCanvasCreate(int width, int height, TextureFormat format, CanvasType type, int msaa, bool depth, bool stencil);
2017-12-07 07:50:52 +00:00
void lovrCanvasDestroy(const Ref* ref);
void lovrCanvasBind(Canvas* canvas);
void lovrCanvasResolveMSAA(Canvas* canvas);
2017-12-08 02:14:24 +00:00
int lovrCanvasGetMSAA(Canvas* canvas);