|
|
@@ -2656,6 +2656,11 @@ again:
|
|
|
FrameBufferHandle createFrameBuffer(uint8_t _num, TextureHandle* _handles, bool _destroyTextures)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
+ BX_CHECK(_num != 0, "Number of frame buffer attachments can't be 0.");
|
|
|
+ BX_CHECK(_num <= BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS, "Number of frame buffer attachments is larger than allowed %d (max: %d)."
|
|
|
+ , _num
|
|
|
+ , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS
|
|
|
+ );
|
|
|
BX_CHECK(NULL != _handles, "_handles can't be NULL");
|
|
|
FrameBufferHandle handle = s_ctx->createFrameBuffer(_num, _handles);
|
|
|
if (_destroyTextures)
|