diff options
| author | Andre Weissflog <floooh@gmail.com> | 2020-05-21 19:53:22 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2020-05-21 19:53:22 +0200 |
| commit | 507befe2d1b31e399b9fe4bc4da7685a8dd186e4 (patch) | |
| tree | 2745993af86a54ab444bab78451dfcfb1d11aeff /sokol_glue.h | |
| parent | bf0152db852f5b16b6681f72a155a7e5e47de987 (diff) | |
sokol_app.h: remove sapp_pixel_format enum
The functions sapp_color_format() and sapp_depth_format() instead
return an integer value that's compatible with sg_pixel_format
now. This allows to plug the return value directly into
places where sg_pixel_format is expected without casting
(recent clang versions started to warn about the conversion
from sapp_pixel_format to sg_pixel_format).
Diffstat (limited to 'sokol_glue.h')
| -rw-r--r-- | sokol_glue.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sokol_glue.h b/sokol_glue.h index f8677bce..c47892b7 100644 --- a/sokol_glue.h +++ b/sokol_glue.h @@ -105,10 +105,6 @@ SOKOL_API_DECL sg_context_desc sapp_sgcontext(void); #if defined(SOKOL_GFX_INCLUDED) && defined(SOKOL_APP_INCLUDED) SOKOL_API_IMPL sg_context_desc sapp_sgcontext(void) { - SOKOL_ASSERT(SAPP_PIXELFORMAT_RGBA8 == (sapp_pixel_format) SG_PIXELFORMAT_RGBA8); - SOKOL_ASSERT(SAPP_PIXELFORMAT_BGRA8 == (sapp_pixel_format) SG_PIXELFORMAT_BGRA8); - SOKOL_ASSERT(SAPP_PIXELFORMAT_DEPTH == (sapp_pixel_format) SG_PIXELFORMAT_DEPTH); - SOKOL_ASSERT(SAPP_PIXELFORMAT_DEPTH_STENCIL == (sapp_pixel_format) SG_PIXELFORMAT_DEPTH_STENCIL); sg_context_desc desc; memset(&desc, 0, sizeof(desc)); desc.color_format = (sg_pixel_format) sapp_color_format(); |