Minor fixes.

This commit is contained in:
David Lannan 2024-10-30 01:00:03 +10:30
parent cad90e562b
commit 8a704614aa
2 changed files with 28 additions and 3 deletions

View File

@ -18,6 +18,11 @@ ffi.cdef[[
typedef union hmm_vec2
{
struct
{
float x, y;
};
struct
{
float X, Y;
@ -43,6 +48,11 @@ typedef union hmm_vec2
typedef union hmm_vec3
{
struct
{
float x, y, z;
};
struct
{
float X, Y, Z;
@ -96,6 +106,10 @@ typedef union hmm_vec4
{
float X, Y, Z;
};
struct
{
float x, y, z;
};
};
float W;
@ -109,6 +123,10 @@ typedef union hmm_vec4
{
float R, G, B;
};
struct
{
float x, y, z;
};
};
float A;
@ -155,9 +173,17 @@ typedef union hmm_quaternion
{
float X, Y, Z;
};
struct
{
float x, y, z;
};
};
union
{
float W;
float w;
};
};
float Elements[4];

View File

@ -75,7 +75,7 @@ sh_compiler.process_shader = function( filename, shader_src, program_name )
ffi_str = ffi_str..typedefs
ffi_str = ffi_str.."]]\n\n"
end
print(ffi_str)
-- Make a sg_shader_desc
-- get vs_source
@ -132,7 +132,6 @@ sh_compiler.compile = function( glslfile, program_name )
local command = exec..' -i '..glslfile.." -o "..sh_compiler.target_tmp
command = command.." -l "..sh_compiler.target_lang.." -f "..sh_compiler.target_output
print(command)
local runner = io.popen(command, "r")
-- Read in the results, then the files