Added ability to configure backbuffer depth/stencil.

This commit is contained in:
Бранимир Караџић
2025-10-28 15:49:09 -07:00
parent f7c4dd70f2
commit 959cab248e
26 changed files with 691 additions and 523 deletions

View File

@@ -2120,7 +2120,8 @@ public static class bgfx
[CRepr]
public struct Resolution
{
public TextureFormat format;
public TextureFormat formatColor;
public TextureFormat formatDepthStencil;
public uint32 width;
public uint32 height;
public uint32 reset;

View File

@@ -1465,8 +1465,10 @@ struct PlatformData
// Backbuffer resolution and reset parameters.
struct Resolution
{
// Backbuffer format.
TextureFormat format;
// Backbuffer color format.
TextureFormat formatColor;
// Backbuffer depth/stencil format.
TextureFormat formatDepthStencil;
// Backbuffer width.
uint width;
// Backbuffer height.

View File

@@ -2098,7 +2098,8 @@ public static partial class bgfx
public unsafe struct Resolution
{
public TextureFormat format;
public TextureFormat formatColor;
public TextureFormat formatDepthStencil;
public uint width;
public uint height;
public uint reset;

View File

@@ -9,7 +9,7 @@ import bindbc.common.types: c_int64, c_uint64, va_list;
import bindbc.bgfx.config;
static import bgfx.impl;
enum uint apiVersion = 130;
enum uint apiVersion = 131;
alias ViewID = ushort;
@@ -1112,7 +1112,8 @@ extern(C++, "bgfx") struct PlatformData{
///Backbuffer resolution and reset parameters.
extern(C++, "bgfx") struct Resolution{
TextureFormat format; ///Backbuffer format.
TextureFormat formatColor; ///Backbuffer color format.
TextureFormat formatDepthStencil; ///Backbuffer depth/stencil format.
uint width; ///Backbuffer width.
uint height; ///Backbuffer height.
uint reset; ///Reset parameters.

View File

@@ -1340,7 +1340,8 @@ pub const Caps = extern struct {
};
pub const Resolution = extern struct {
format: TextureFormat,
formatColor: TextureFormat,
formatDepthStencil: TextureFormat,
width: u32,
height: u32,
reset: u32,