Branimir Karadžić 9 ani în urmă
părinte
comite
c1c7942265
2 a modificat fișierele cu 8 adăugiri și 1 ștergeri
  1. 1 1
      include/bgfx/bgfx.h
  2. 7 0
      src/bgfx.cpp

+ 1 - 1
include/bgfx/bgfx.h

@@ -1850,7 +1850,7 @@ namespace bgfx
 	///
 	/// @returns Handle to frame buffer object.
 	///
-	/// @attention C99 equivalent is `bgfx_create_frame_buffer_from_handles`.
+	/// @attention C99 equivalent is `bgfx_create_frame_buffer_from_attachment`.
 	///
 	FrameBufferHandle createFrameBuffer(
 		  uint8_t _num

+ 7 - 0
src/bgfx.cpp

@@ -4248,6 +4248,13 @@ BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_scaled(bgfx_backb
 	return handle.c;
 }
 
+BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint8_t _num, const bgfx_texture_handle_t* _handles, bool _destroyTextures)
+{
+	union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle;
+	handle.cpp = bgfx::createFrameBuffer(_num, (const bgfx::TextureHandle*)_handles, _destroyTextures);
+	return handle.c;
+}
+
 BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_attachment(uint8_t _num, const bgfx_attachment_t* _attachment, bool _destroyTextures)
 {
 	union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle;