Refactoring structs Part 1

This commit is contained in:
2021-05-20 22:20:52 -07:00
parent 17ddb4246a
commit 9bcf6223b6
56 changed files with 484 additions and 422 deletions

View File

@ -10,22 +10,30 @@
#include "texture.h"
/**
* Creates a new frame buffer that can be rendered to.
*
* Initializes frame buffer that can be rendered to.
* @param frameBuffer Frame buffer to initialize.
* @param width Width of the frame buffer (in pixels).
* @param height Height of the frame buffer (in pixels).
* @return A renderable frame buffer.
*/
framebuffer_t * frameBufferCreate(int32_t width, int32_t height);
void frameBufferInit(framebuffer_t *buffer, int32_t width, int32_t height);
/**
* Use a given frame buffer as the current rendering context.
*
* @param frameBuffer Frame buffer to use, or NULL to not use any.
* @param frameBuffer Frame buffer to use.
* @param clear Whether or not to clear the frame buffer prior to rendering.
*/
void frameBufferUse(framebuffer_t *frameBuffer, bool clear);
/**
* Unbind the currently bound frame buffer.
*
* @param render Render manager
* @param clear Whether or not to clear the back buffer.
*/
void frameBufferUnbind(render_t *render, bool clear);
/**
* Dispose/cleanup a previously created frame buffer.
*