From 01b5fbe61bf89d0abefd555899b27522c780660e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Catarino=20Fran=C3=A7a?= Date: Mon, 12 Feb 2024 16:26:33 -0300 Subject: [PATCH] updated (https://github.com/floooh/sokol/commit/a40c4460c9383228726efcb9f5b96abc996ba0fe) --- src/sokol/c/sokol_app.h | 4 ++-- src/sokol/c/sokol_debugtext.h | 4 ++-- src/sokol/c/sokol_gfx.h | 20 ++++++++++---------- src/sokol/c/sokol_gl.h | 2 +- src/sokol/c/sokol_time.h | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/sokol/c/sokol_app.h b/src/sokol/c/sokol_app.h index c4fde9d..064a72f 100644 --- a/src/sokol/c/sokol_app.h +++ b/src/sokol/c/sokol_app.h @@ -1622,7 +1622,7 @@ typedef struct sapp_allocator { _SAPP_LOGITEM_XMACRO(ANDROID_NATIVE_ACTIVITY_DONE, "NativeActivity done") \ _SAPP_LOGITEM_XMACRO(ANDROID_NATIVE_ACTIVITY_ONCREATE, "NativeActivity onCreate") \ _SAPP_LOGITEM_XMACRO(ANDROID_CREATE_THREAD_PIPE_FAILED, "failed to create thread pipe") \ - _SAPP_LOGITEM_XMACRO(ANDROID_NATIVE_ACTIVITY_CREATE_SUCCESS, "NativeActivity sucessfully created") \ + _SAPP_LOGITEM_XMACRO(ANDROID_NATIVE_ACTIVITY_CREATE_SUCCESS, "NativeActivity successfully created") \ _SAPP_LOGITEM_XMACRO(WGPU_SWAPCHAIN_CREATE_SURFACE_FAILED, "wgpu: failed to create surface for swapchain") \ _SAPP_LOGITEM_XMACRO(WGPU_SWAPCHAIN_CREATE_SWAPCHAIN_FAILED, "wgpu: failed to create swapchain object") \ _SAPP_LOGITEM_XMACRO(WGPU_SWAPCHAIN_CREATE_DEPTH_STENCIL_TEXTURE_FAILED, "wgpu: failed to create depth-stencil texture for swapchain") \ @@ -1810,7 +1810,7 @@ SOKOL_APP_API_DECL sapp_desc sapp_query_desc(void); SOKOL_APP_API_DECL void sapp_request_quit(void); /* cancel a pending quit (when SAPP_EVENTTYPE_QUIT_REQUESTED has been received) */ SOKOL_APP_API_DECL void sapp_cancel_quit(void); -/* initiate a "hard quit" (quit application without sending SAPP_EVENTTYPE_QUIT_REQUSTED) */ +/* initiate a "hard quit" (quit application without sending SAPP_EVENTTYPE_QUIT_REQUESTED) */ SOKOL_APP_API_DECL void sapp_quit(void); /* call from inside event callback to consume the current event (don't forward to platform) */ SOKOL_APP_API_DECL void sapp_consume_event(void); diff --git a/src/sokol/c/sokol_debugtext.h b/src/sokol/c/sokol_debugtext.h index 6859159..cec0694 100644 --- a/src/sokol/c/sokol_debugtext.h +++ b/src/sokol/c/sokol_debugtext.h @@ -148,7 +148,7 @@ - to render characters at 16x16 physical pixels: - sdtx_canvas(sapp_width()/2.0f, sapp_heigth()/2.0f); + sdtx_canvas(sapp_width()/2.0f, sapp_height()/2.0f); Do *not* use integer math here, since this will not look nice when the render target size isn't divisible by 2. @@ -4135,7 +4135,7 @@ static void _sdtx_render_char(_sdtx_context_t* ctx, uint8_t c) { const float x1 = x0 + ctx->glyph_size.x; const float y1 = y0 + ctx->glyph_size.y; - // glyph width and heigth in font texture space + // glyph width and height in font texture space // NOTE: the '+1' and '-2' fixes texture bleeding into the neighboring font texture cell const uint16_t uvw = 0x10000 / 0x100; const uint16_t uvh = 0x10000 / SDTX_MAX_FONTS; diff --git a/src/sokol/c/sokol_gfx.h b/src/sokol/c/sokol_gfx.h index 328b3b9..73103e6 100644 --- a/src/sokol/c/sokol_gfx.h +++ b/src/sokol/c/sokol_gfx.h @@ -720,7 +720,7 @@ texture-sample-type with the correct sampler-type). For GLSL an additional 'combined-image-sampler name' must be provided because 'OpenGL style GLSL' cannot handle separate texture and sampler objects, but still - groups them into a tradtional GLSL 'sampler object'. + groups them into a traditional GLSL 'sampler object'. Compatibility rules for image-sample-type vs sampler-type are as follows: @@ -2883,7 +2883,7 @@ typedef struct sg_pipeline_desc { sg_make_pass() function. A pass object contains 1..4 color attachments, 0..4 msaa-resolve - attachemnts, and none or one depth-stencil attachment. + attachments, and none or one depth-stencil attachment. Each attachment consists of an image, and two additional indices describing which subimage the pass will render into: one mipmap index, and if the image @@ -3585,7 +3585,7 @@ typedef enum sg_log_item { the more likely are cache slot collisions which will cause a BindGroups object to be destroyed and a new one created. Use the information returned by sg_query_stats() to check - if this is a frequent occurence, and increase the cache size as + if this is a frequent occurrence, and increase the cache size as needed (the default is 1024). NOTE: wgpu_bindgroups_cache_size must be a power-of-2 number! .context.wgpu.device @@ -3879,7 +3879,7 @@ typedef struct sg_d3d11_sampler_info { typedef struct sg_d3d11_shader_info { const void* vs_cbufs[SG_MAX_SHADERSTAGE_UBS]; // ID3D11Buffer* (vertex stage constant buffers) - const void* fs_cbufs[SG_MAX_SHADERSTAGE_UBS]; // ID3D11BUffer* (fragment stage constant buffers) + const void* fs_cbufs[SG_MAX_SHADERSTAGE_UBS]; // ID3D11Buffer* (fragment stage constant buffers) const void* vs; // ID3D11VertexShader* const void* fs; // ID3D11PixelShader* } sg_d3d11_shader_info; @@ -4015,7 +4015,7 @@ SOKOL_GFX_API_DECL const void* sg_wgpu_device(void); SOKOL_GFX_API_DECL const void* sg_wgpu_queue(void); // WebGPU: return this frame's WGPUCommandEncoder SOKOL_GFX_API_DECL const void* sg_wgpu_command_encoder(void); -// WebGPU: return WGPURenderPassEncoder of currrent pass +// WebGPU: return WGPURenderPassEncoder of current pass SOKOL_GFX_API_DECL const void* sg_wgpu_render_pass_encoder(void); // WebGPU: get internal buffer resource objects SOKOL_GFX_API_DECL sg_wgpu_buffer_info sg_wgpu_query_buffer_info(sg_buffer buf); @@ -5373,7 +5373,7 @@ typedef struct { } _sg_mtl_context_t; typedef _sg_mtl_context_t _sg_context_t; -// resouce binding state cache +// resource binding state cache typedef struct { const _sg_pipeline_t* cur_pipeline; sg_pipeline cur_pipeline_id; @@ -8381,7 +8381,7 @@ _SOKOL_PRIVATE sg_resource_state _sg_gl_create_pass(_sg_pass_t* pass, _sg_image_ _sg_gl_fb_attach_texture(&pass->gl.color_atts[i], &pass->cmn.color_atts[i], gl_att_type); } } - // attach depth-stencil attachement + // attach depth-stencil attachment if (pass->gl.ds_att.image) { const GLenum gl_att = _sg_gl_depth_stencil_attachment_type(&pass->gl.ds_att); const _sg_image_t* ds_img = pass->gl.ds_att.image; @@ -11945,7 +11945,7 @@ _SOKOL_PRIVATE void _sg_mtl_copy_image_data(const _sg_image_t* img, __unsafe_unr } } -// initialize MTLTextureDescritor with common attributes +// initialize MTLTextureDescriptor with common attributes _SOKOL_PRIVATE bool _sg_mtl_init_texdesc_common(MTLTextureDescriptor* mtl_desc, _sg_image_t* img) { mtl_desc.textureType = _sg_mtl_texture_type(img->cmn.type); mtl_desc.pixelFormat = _sg_mtl_pixel_format(img->cmn.pixel_format); @@ -11976,7 +11976,7 @@ _SOKOL_PRIVATE bool _sg_mtl_init_texdesc_common(MTLTextureDescriptor* mtl_desc, return true; } -// initialize MTLTextureDescritor with rendertarget attributes +// initialize MTLTextureDescriptor with rendertarget attributes _SOKOL_PRIVATE void _sg_mtl_init_texdesc_rt(MTLTextureDescriptor* mtl_desc, _sg_image_t* img) { SOKOL_ASSERT(img->cmn.render_target); _SOKOL_UNUSED(img); @@ -11984,7 +11984,7 @@ _SOKOL_PRIVATE void _sg_mtl_init_texdesc_rt(MTLTextureDescriptor* mtl_desc, _sg_ mtl_desc.resourceOptions = MTLResourceStorageModePrivate; } -// initialize MTLTextureDescritor with MSAA attributes +// initialize MTLTextureDescriptor with MSAA attributes _SOKOL_PRIVATE void _sg_mtl_init_texdesc_rt_msaa(MTLTextureDescriptor* mtl_desc, _sg_image_t* img) { SOKOL_ASSERT(img->cmn.sample_count > 1); mtl_desc.usage = MTLTextureUsageRenderTarget; diff --git a/src/sokol/c/sokol_gl.h b/src/sokol/c/sokol_gl.h index 88a62ba..997ddea 100644 --- a/src/sokol/c/sokol_gl.h +++ b/src/sokol/c/sokol_gl.h @@ -453,7 +453,7 @@ sgl_set_context(ctx); - The currently active context will implicitely be used by most sokol-gl functions + The currently active context will implicitly be used by most sokol-gl functions which don't take an explicit context handle as argument. To switch back to the default context, pass the global constant SGL_DEFAULT_CONTEXT: diff --git a/src/sokol/c/sokol_time.h b/src/sokol/c/sokol_time.h index 2d4d456..fd766d8 100644 --- a/src/sokol/c/sokol_time.h +++ b/src/sokol/c/sokol_time.h @@ -296,7 +296,7 @@ SOKOL_API_IMPL uint64_t stm_round_to_common_refresh_rate(uint64_t ticks) { } i++; } - // fallthough: didn't fit into any buckets + // fallthrough: didn't fit into any buckets return ticks; }