Added screen
This commit is contained in:
@@ -6,23 +6,43 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "display/display.h"
|
||||
#include "display/texture/texture.h"
|
||||
|
||||
#define FRAMEBUFFER_CLEAR_COLOR (1 << 0)
|
||||
#define FRAMEBUFFER_CLEAR_DEPTH (1 << 1)
|
||||
|
||||
typedef struct {
|
||||
#if DISPLAY_SDL2
|
||||
#if DISPLAY_SDL2 == 1
|
||||
// OpenGL Framebuffer Object ID
|
||||
GLuint id;
|
||||
texture_t texture;
|
||||
#else
|
||||
#error "Framebuffers not implemented on this platform."
|
||||
#endif
|
||||
} framebuffer_t;
|
||||
|
||||
extern framebuffer_t FRAMEBUFFER_BACKBUFFER;
|
||||
extern const framebuffer_t *FRAMEBUFFER_BOUND;
|
||||
|
||||
void frameBufferInitBackbuffer();
|
||||
/**
|
||||
* Initializes the backbuffer framebuffer.
|
||||
*/
|
||||
void frameBufferInitBackbuffer(void);
|
||||
|
||||
/**
|
||||
* Initializes a framebuffer.
|
||||
*
|
||||
* @param framebuffer The framebuffer to initialize.
|
||||
* @param width The width of the framebuffer.
|
||||
* @param height The height of the framebuffer.
|
||||
*/
|
||||
#if DISPLAY_SIZE_DYNAMIC == 1
|
||||
void frameBufferInit(
|
||||
framebuffer_t *framebuffer,
|
||||
const uint32_t width,
|
||||
const uint32_t height
|
||||
);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Gets the width of the framebuffer.
|
||||
|
Reference in New Issue
Block a user