mirror of
https://github.com/guezoloic/t3dsr.git
synced 2026-01-25 09:34:24 +00:00
fix: change vec3.data 3 -> 4
fix cmake for microsoft
This commit is contained in:
@@ -2,7 +2,13 @@ cmake_minimum_required(VERSION 3.10)
|
||||
project(t3dsr C)
|
||||
|
||||
set(CMAKE_C_STANDARD 17)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
|
||||
|
||||
# if microsoft compilation
|
||||
if (MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS src/*.c)
|
||||
file(GLOB_RECURSE HEADERS CONFIGURE_DEPENDS src/*.h)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
#include "vec3.h"
|
||||
#include "common_math.h"
|
||||
|
||||
#define VEC_SIZE 3
|
||||
|
||||
|
||||
@@ -8,12 +8,10 @@
|
||||
#ifndef vec3_h
|
||||
#define vec3_h
|
||||
|
||||
#include "common_math.h"
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct {float x, y, z; };
|
||||
float data[3];
|
||||
float data[4];
|
||||
} __attribute__((aligned(16))) Vec3f_t;
|
||||
|
||||
Vec3f_t vec3f_from_array(const float *__restrict val);
|
||||
|
||||
Reference in New Issue
Block a user