aboutsummaryrefslogtreecommitdiff
path: root/sokol_glue.h
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2024-02-04 10:56:59 +0100
committerAndre Weissflog <floooh@gmail.com>2024-02-04 10:56:59 +0100
commit6441bf44a1f21fb61ab378bca30a4102aeb1fa09 (patch)
tree3e6c9cd8bf46d0b23b9518b39a405ff14fd64a6b /sokol_glue.h
parent486138e05abe0156d062480c10dce0d093081237 (diff)
sokol_gfx.h: rename sg_context_desc to sg_environment
Diffstat (limited to 'sokol_glue.h')
-rw-r--r--sokol_glue.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/sokol_glue.h b/sokol_glue.h
index 01dbcb51..f1bf3aa3 100644
--- a/sokol_glue.h
+++ b/sokol_glue.h
@@ -94,7 +94,7 @@ extern "C" {
#endif
#if defined(SOKOL_GFX_INCLUDED) && defined(SOKOL_APP_INCLUDED)
-SOKOL_GLUE_API_DECL sg_context_desc sapp_sgcontext(void);
+SOKOL_GLUE_API_DECL sg_environment sapp_sgenvironment(void);
SOKOL_GLUE_API_DECL sg_swapchain sapp_sgswapchain(void);
#endif
@@ -113,17 +113,17 @@ SOKOL_GLUE_API_DECL sg_swapchain sapp_sgswapchain(void);
#endif
#if defined(SOKOL_GFX_INCLUDED) && defined(SOKOL_APP_INCLUDED)
-SOKOL_API_IMPL sg_context_desc sapp_sgcontext(void) {
- sg_context_desc desc;
- memset(&desc, 0, sizeof(desc));
- desc.color_format = (sg_pixel_format) sapp_color_format();
- desc.depth_format = (sg_pixel_format) sapp_depth_format();
- desc.sample_count = sapp_sample_count();
- desc.metal.device = sapp_metal_get_device();
- desc.d3d11.device = sapp_d3d11_get_device();
- desc.d3d11.device_context = sapp_d3d11_get_device_context();
- desc.wgpu.device = sapp_wgpu_get_device();
- return desc;
+SOKOL_API_IMPL sg_environment sapp_sgenvironment(void) {
+ sg_environment env;
+ memset(&env, 0, sizeof(env));
+ env.defaults.color_format = (sg_pixel_format) sapp_color_format();
+ env.defaults.depth_format = (sg_pixel_format) sapp_depth_format();
+ env.defaults.sample_count = sapp_sample_count();
+ env.metal.device = sapp_metal_get_device();
+ env.d3d11.device = sapp_d3d11_get_device();
+ env.d3d11.device_context = sapp_d3d11_get_device_context();
+ env.wgpu.device = sapp_wgpu_get_device();
+ return env;
}
SOKOL_API_IMPL sg_swapchain sapp_sgswapchain(void) {