SectrPrototype/scripts/compile_shaders.ps1
Ed_ 936c0100ba Got text rendering to work with sokol_gfx (learngl text rendering article #1)
Need to todo the altas article next then the optimizing vod
2024-05-30 13:06:51 -04:00

30 lines
1.2 KiB
PowerShell

$path_root = git rev-parse --show-toplevel
$path_code = join-path $path_root 'code'
$path_build = join-path $path_root 'build'
$path_scripts = join-path $path_root 'scripts'
$path_thirdparty = join-path $path_root 'thirdparty'
$path_toolchain = join-path $path_root 'toolchain'
$path_odin = join-path $path_toolchain 'odin'
$path_sokol_tools = join-path $path_thirdparty 'sokol-tools'
$path_sectr = join-path $path_code 'sectr'
$path_shaders = join-path $path_sectr 'shaders'
$sokol_shdc = join-path $path_sokol_tools 'bin/win32/sokol-shdc.exe'
$shadersrc_learngl_font_glyph = join-path $path_shaders 'learngl_font_glyph_sokol.glsl'
$shaderout_learngl_font_glyph = join-path $path_shaders 'learngl_font_glyph_sokol.odin'
$flag_input = '--input '
$flag_output = '--output '
$flag_target_lang = '--slang '
$flag_format_odin = '--format=sokol_odin'
$cmd_args = @()
$cmd_args += $flag_input + $shadersrc_learngl_font_glyph
$cmd_args += $flag_output + $shaderout_learngl_font_glyph
$cmd_args += $flag_target_lang + 'hlsl5'
& $sokol_shdc --input $shadersrc_learngl_font_glyph --output $shaderout_learngl_font_glyph --slang 'hlsl5' $flag_format_odin