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

31 lines
669 B
C
Raw Normal View History

2017-12-07 07:50:52 +00:00
#include "graphics/texture.h"
#include "util.h"
#include <stdbool.h>
2017-12-07 07:50:52 +00:00
#pragma once
2017-12-07 07:50:52 +00:00
typedef struct {
int msaa;
bool depth;
bool stencil;
bool stereo;
bool mipmaps;
} CanvasFlags;
2017-12-07 07:50:52 +00:00
typedef struct {
Texture texture;
GLuint framebuffer;
GLuint resolveFramebuffer;
GLuint depthStencilBuffer;
2017-12-07 07:50:52 +00:00
GLuint msaaTexture;
CanvasFlags flags;
2017-12-07 07:50:52 +00:00
} Canvas;
bool lovrCanvasSupportsFormat(TextureFormat format);
Canvas* lovrCanvasCreate(int width, int height, TextureFormat format, CanvasFlags flags);
2018-02-26 08:59:03 +00:00
void lovrCanvasDestroy(void* ref);
2018-03-05 10:48:36 +00:00
void lovrCanvasResolve(Canvas* canvas);
2017-12-09 18:52:46 +00:00
TextureFormat lovrCanvasGetFormat(Canvas* canvas);
2017-12-08 02:14:24 +00:00
int lovrCanvasGetMSAA(Canvas* canvas);