Бранимир Караџић 5 năm trước cách đây
mục cha
commit
000a3b704c
5 tập tin đã thay đổi với 58 bổ sung22 xóa
  1. 20 5
      bindings/d/types.d
  2. 8 5
      include/bgfx/bgfx.h
  3. 20 5
      include/bgfx/c99/bgfx.h
  4. 8 5
      scripts/bgfx.idl
  5. 2 2
      src/version.h

+ 20 - 5
bindings/d/types.d

@@ -780,11 +780,26 @@ struct bgfx_internal_data_t
 /// Platform data.
 struct bgfx_platform_data_t
 {
-	void* ndt; /// Native display type.
-	void* nwh; /// Native window handle.
-	void* context; /// GL context, or D3D device.
-	void* backBuffer; /// GL backbuffer, or D3D render target view.
-	void* backBufferDS; /// Backbuffer depth/stencil.
+	void* ndt; /// Native display type (*nix specific).
+
+	/**
+	 * Native window handle. If `NULL` bgfx will create headless
+	 * context/device if renderer API supports it.
+	 */
+	void* nwh;
+	void* context; /// GL context, or D3D device. If `NULL`, bgfx will create context/device.
+
+	/**
+	 * GL back-buffer, or D3D render target view. If `NULL` bgfx will
+	 * create back-buffer color surface.
+	 */
+	void* backBuffer;
+
+	/**
+	 * Backbuffer depth/stencil. If `NULL` bgfx will create back-buffer
+	 * depth/stencil surface.
+	 */
+	void* backBufferDS;
 }
 
 /// Backbuffer resolution and reset parameters.

+ 8 - 5
include/bgfx/bgfx.h

@@ -609,11 +609,14 @@ namespace bgfx
 	{
 		PlatformData();
 
-		void* ndt;          //!< Native display type.
-		void* nwh;          //!< Native window handle.
-		void* context;      //!< GL context, or D3D device.
-		void* backBuffer;   //!< GL backbuffer, or D3D render target view.
-		void* backBufferDS; //!< Backbuffer depth/stencil.
+		void* ndt;          //!< Native display type (*nix specific).
+		void* nwh;          //!< Native window handle. If `NULL` bgfx will create headless
+		                    ///  context/device if renderer API supports it.
+		void* context;      //!< GL context, or D3D device. If `NULL`, bgfx will create context/device.
+		void* backBuffer;   //!< GL back-buffer, or D3D render target view. If `NULL` bgfx will
+		                    ///  create back-buffer color surface.
+		void* backBufferDS; //!< Backbuffer depth/stencil. If `NULL` bgfx will create back-buffer
+		                    ///  depth/stencil surface.
 	};
 
 	/// Backbuffer resolution and reset parameters.

+ 20 - 5
include/bgfx/c99/bgfx.h

@@ -583,11 +583,26 @@ typedef struct bgfx_internal_data_s
  */
 typedef struct bgfx_platform_data_s
 {
-    void*                ndt;                /** Native display type.                     */
-    void*                nwh;                /** Native window handle.                    */
-    void*                context;            /** GL context, or D3D device.               */
-    void*                backBuffer;         /** GL backbuffer, or D3D render target view. */
-    void*                backBufferDS;       /** Backbuffer depth/stencil.                */
+    void*                ndt;                /** Native display type (*nix specific).     */
+    
+    /**
+     * Native window handle. If `NULL` bgfx will create headless
+     * context/device if renderer API supports it.
+     */
+    void*                nwh;
+    void*                context;            /** GL context, or D3D device. If `NULL`, bgfx will create context/device. */
+    
+    /**
+     * GL back-buffer, or D3D render target view. If `NULL` bgfx will
+     * create back-buffer color surface.
+     */
+    void*                backBuffer;
+    
+    /**
+     * Backbuffer depth/stencil. If `NULL` bgfx will create back-buffer
+     * depth/stencil surface.
+     */
+    void*                backBufferDS;
 
 } bgfx_platform_data_t;
 

+ 8 - 5
scripts/bgfx.idl

@@ -744,11 +744,14 @@ struct.InternalData
 
 --- Platform data.
 struct.PlatformData { ctor }
-	.ndt          "void*" --- Native display type.
-	.nwh          "void*" --- Native window handle.
-	.context      "void*" --- GL context, or D3D device.
-	.backBuffer   "void*" --- GL backbuffer, or D3D render target view.
-	.backBufferDS "void*" --- Backbuffer depth/stencil.
+	.ndt          "void*" --- Native display type (*nix specific).
+	.nwh          "void*" --- Native window handle. If `NULL` bgfx will create headless
+	                      --- context/device if renderer API supports it.
+	.context      "void*" --- GL context, or D3D device. If `NULL`, bgfx will create context/device.
+	.backBuffer   "void*" --- GL back-buffer, or D3D render target view. If `NULL` bgfx will
+	                      --- create back-buffer color surface.
+	.backBufferDS "void*" --- Backbuffer depth/stencil. If `NULL` bgfx will create back-buffer
+	                      --- depth/stencil surface.
 
 --- Backbuffer resolution and reset parameters.
 struct.Resolution { ctor }

+ 2 - 2
src/version.h

@@ -9,5 +9,5 @@
  *
  */
 
-#define BGFX_REV_NUMBER 7085
-#define BGFX_REV_SHA1   "06460b8ac23e152f42d342dd58d491c3d1764f5b"
+#define BGFX_REV_NUMBER 7124
+#define BGFX_REV_SHA1   "4420bf420eb933c59b54bb7e25bba3ecb4422925"