DRW: Add DRW_framebuffer_create() function.

This is because certain part of the engine may require a blank framebuffer to bind textures to.
This is the case when using only array textures, unsupported by DRW_framebuffer_init().
This commit is contained in:
2018-01-17 13:47:47 +01:00
parent c6101b09eb
commit 54e10dbd17
2 changed files with 6 additions and 0 deletions

View File

@@ -229,6 +229,7 @@ typedef struct DRWFboTexture {
DRWTextureFlag flag;
} DRWFboTexture;
struct GPUFrameBuffer *DRW_framebuffer_create(void);
void DRW_framebuffer_init(
struct GPUFrameBuffer **fb, void *engine_type, int width, int height,
DRWFboTexture textures[MAX_FBO_TEX], int textures_len);

View File

@@ -2299,6 +2299,11 @@ static GPUTextureFormat convert_tex_format(
}
}
struct GPUFrameBuffer *DRW_framebuffer_create(void)
{
return GPU_framebuffer_create();
}
void DRW_framebuffer_init(
struct GPUFrameBuffer **fb, void *engine_type, int width, int height,
DRWFboTexture textures[MAX_FBO_TEX], int textures_len)