2017-12-07 07:50:52 +00:00
|
|
|
#include "graphics/texture.h"
|
|
|
|
#include "util.h"
|
|
|
|
|
2018-02-15 08:37:02 +00:00
|
|
|
#pragma once
|
2017-12-07 07:50:52 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
Texture texture;
|
|
|
|
GLuint framebuffer;
|
|
|
|
GLuint resolveFramebuffer;
|
2017-12-09 18:49:37 +00:00
|
|
|
GLuint depthStencilBuffer;
|
2017-12-07 07:50:52 +00:00
|
|
|
GLuint msaaTexture;
|
|
|
|
int msaa;
|
|
|
|
} Canvas;
|
|
|
|
|
2017-12-09 18:49:37 +00:00
|
|
|
bool lovrCanvasSupportsFormat(TextureFormat format);
|
|
|
|
|
2018-02-15 08:37:02 +00:00
|
|
|
Canvas* lovrCanvasCreate(int width, int height, TextureFormat format, int msaa, bool depth, bool stencil);
|
2017-12-07 07:50:52 +00:00
|
|
|
void lovrCanvasDestroy(const Ref* ref);
|
2017-12-09 18:52:46 +00:00
|
|
|
TextureFormat lovrCanvasGetFormat(Canvas* canvas);
|
2017-12-08 02:14:24 +00:00
|
|
|
int lovrCanvasGetMSAA(Canvas* canvas);
|