Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Feb 12, 2024
1 parent d3e738b commit 01b5fbe
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/sokol/c/sokol_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -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") \
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/sokol/c/sokol_debugtext.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions src/sokol/c/sokol_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -11976,15 +11976,15 @@ _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);
mtl_desc.usage = MTLTextureUsageShaderRead | MTLTextureUsageRenderTarget;
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;
Expand Down
2 changes: 1 addition & 1 deletion src/sokol/c/sokol_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/sokol/c/sokol_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 01b5fbe

Please sign in to comment.