diff --git a/backend/sokol/draw_text.odin b/backend/sokol/draw_text.odin index badda9e..6bd09e4 100644 --- a/backend/sokol/draw_text.odin +++ b/backend/sokol/draw_text.odin @@ -52,13 +52,13 @@ Ve_Draw_Text_Fs_Params :: struct #align(16) { void main() { - uv = vec2(v_texture.x, 1.0 - v_texture.y); + uv = vec2(v_texture.x, v_texture.y); gl_Position = vec4((v_position * 2.0) - vec2(1.0), 0.0, 1.0); } */ @(private="file") -ve_draw_text_vs_source_glsl410 := [261]u8 { +ve_draw_text_vs_source_glsl410 := [255]u8 { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x34,0x31,0x30,0x0a,0x0a,0x6c,0x61, 0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20, 0x30,0x29,0x20,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a, @@ -69,13 +69,12 @@ ve_draw_text_vs_source_glsl410 := [261]u8 { 0x76,0x65,0x63,0x32,0x20,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b, 0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a, 0x20,0x20,0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x76,0x5f, - 0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x78,0x2c,0x20,0x31,0x2e,0x30,0x20,0x2d, - 0x20,0x76,0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x79,0x29,0x3b,0x0a,0x20, - 0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d, - 0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f, - 0x6e,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28, - 0x31,0x2e,0x30,0x29,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b, - 0x0a,0x7d,0x0a,0x0a,0x00, + 0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x78,0x2c,0x20,0x76,0x5f,0x74,0x65,0x78, + 0x74,0x75,0x72,0x65,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f, + 0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28, + 0x28,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x2a,0x20,0x32,0x2e, + 0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20, + 0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, } /* #version 410 @@ -155,13 +154,13 @@ ve_draw_text_fs_source_glsl410 := [812]u8 { void main() { - uv = vec2(v_texture.x, 1.0 - v_texture.y); + uv = vec2(v_texture.x, v_texture.y); gl_Position = vec4((v_position * 2.0) - vec2(1.0), 0.0, 1.0); } */ @(private="file") -ve_draw_text_vs_source_glsl300es := [243]u8 { +ve_draw_text_vs_source_glsl300es := [237]u8 { 0x23,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,0x20,0x33,0x30,0x30,0x20,0x65,0x73,0x0a, 0x0a,0x6f,0x75,0x74,0x20,0x76,0x65,0x63,0x32,0x20,0x75,0x76,0x3b,0x0a,0x6c,0x61, 0x79,0x6f,0x75,0x74,0x28,0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20, @@ -171,13 +170,12 @@ ve_draw_text_vs_source_glsl300es := [243]u8 { 0x63,0x32,0x20,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x0a, 0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20, 0x20,0x20,0x75,0x76,0x20,0x3d,0x20,0x76,0x65,0x63,0x32,0x28,0x76,0x5f,0x74,0x65, - 0x78,0x74,0x75,0x72,0x65,0x2e,0x78,0x2c,0x20,0x31,0x2e,0x30,0x20,0x2d,0x20,0x76, - 0x5f,0x74,0x65,0x78,0x74,0x75,0x72,0x65,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20, - 0x20,0x67,0x6c,0x5f,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76, - 0x65,0x63,0x34,0x28,0x28,0x76,0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20, - 0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e, - 0x30,0x29,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d, - 0x0a,0x0a,0x00, + 0x78,0x74,0x75,0x72,0x65,0x2e,0x78,0x2c,0x20,0x76,0x5f,0x74,0x65,0x78,0x74,0x75, + 0x72,0x65,0x2e,0x79,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x67,0x6c,0x5f,0x50,0x6f, + 0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x28,0x76, + 0x5f,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29, + 0x20,0x2d,0x20,0x76,0x65,0x63,0x32,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x30,0x2e, + 0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00, } /* #version 300 es diff --git a/backend/sokol/draw_text.shdc.glsl b/backend/sokol/draw_text.shdc.glsl index 10233a0..a3278c7 100644 --- a/backend/sokol/draw_text.shdc.glsl +++ b/backend/sokol/draw_text.shdc.glsl @@ -10,7 +10,11 @@ out vec2 uv; void main() { - uv = vec2( v_texture.x, 1 - v_texture.y ); +#if SOKOL_GLSL + uv = vec2( v_texture.x, v_texture.y ); +#else + uv = vec2( v_texture.x, 1.0 - v_texture.y ); +#endif gl_Position = vec4( v_position * 2.0f - 1.0f, 0.0f, 1.0f ); } @end diff --git a/scripts/helpers/odin_compiler_defs.sh b/scripts/helpers/odin_compiler_defs.sh index 721aba0..9f1045f 100644 --- a/scripts/helpers/odin_compiler_defs.sh +++ b/scripts/helpers/odin_compiler_defs.sh @@ -62,4 +62,5 @@ flag_vet_using_stmt='-vet-using-stmt' # flag_msvc_link_debug='/DEBUG' # Assuming to be in default path, change if otherwise -odin_compiler='odin' +# odin_compiler='odin' +odin_compiler='/mnt/c/projects/SectrPrototype/toolchain/Odin/odin' diff --git a/thirdparty/harfbuzz b/thirdparty/harfbuzz new file mode 160000 index 0000000..834fd86 --- /dev/null +++ b/thirdparty/harfbuzz @@ -0,0 +1 @@ +Subproject commit 834fd866785786477b2c0bd5ce5aa1e2848efa12 diff --git a/thirdparty/stb/lib/stb_truetype.lib b/thirdparty/stb/lib/stb_truetype.lib index c217736..6d2c666 100644 Binary files a/thirdparty/stb/lib/stb_truetype.lib and b/thirdparty/stb/lib/stb_truetype.lib differ