fix: accomodate recent math module renamings
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
582b7c09c6
commit
451a8d5ea6
13 changed files with 36 additions and 36 deletions
|
|
@ -10,7 +10,7 @@ namespace lt::input {
|
||||||
export class AnalogEvent
|
export class AnalogEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AnalogEvent(Key key, math::uvec2 pointer_position)
|
AnalogEvent(Key key, math::vec2_u32 pointer_position)
|
||||||
: m_key(key)
|
: m_key(key)
|
||||||
, m_pointer_position(pointer_position)
|
, m_pointer_position(pointer_position)
|
||||||
{
|
{
|
||||||
|
|
@ -21,7 +21,7 @@ public:
|
||||||
return m_key;
|
return m_key;
|
||||||
};
|
};
|
||||||
|
|
||||||
[[nodiscard]] auto get_pointer_position() const -> math::uvec2
|
[[nodiscard]] auto get_pointer_position() const -> math::vec2_u32
|
||||||
{
|
{
|
||||||
return m_pointer_position;
|
return m_pointer_position;
|
||||||
}
|
}
|
||||||
|
|
@ -35,7 +35,7 @@ public:
|
||||||
private:
|
private:
|
||||||
Key m_key;
|
Key m_key;
|
||||||
|
|
||||||
math::uvec2 m_pointer_position;
|
math::vec2_u32 m_pointer_position;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace lt::input
|
} // namespace lt::input
|
||||||
|
|
|
||||||
|
|
@ -255,7 +255,7 @@ public:
|
||||||
m_editor_registry->add(
|
m_editor_registry->add(
|
||||||
m_camera_id,
|
m_camera_id,
|
||||||
camera::components::PerspectiveCamera {
|
camera::components::PerspectiveCamera {
|
||||||
.vertical_fov = math::radians(90.0f),
|
.vertical_fov = math::to_radians(90.0f),
|
||||||
.near_plane = 0.1f,
|
.near_plane = 0.1f,
|
||||||
.far_plane = 30.0,
|
.far_plane = 30.0,
|
||||||
.aspect_ratio = 1.0f,
|
.aspect_ratio = 1.0f,
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export import math.mat4;
|
||||||
export namespace constants {
|
export namespace constants {
|
||||||
|
|
||||||
constexpr auto api = lt::renderer::Api::vulkan;
|
constexpr auto api = lt::renderer::Api::vulkan;
|
||||||
constexpr auto resolution = lt::math::uvec2 { 800u, 600u };
|
constexpr auto resolution = lt::math::vec2_u32 { 800u, 600u };
|
||||||
constexpr auto frames_in_flight = u32 { 3u };
|
constexpr auto frames_in_flight = u32 { 3u };
|
||||||
|
|
||||||
} // namespace constants
|
} // namespace constants
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ public:
|
||||||
|
|
||||||
virtual ~ISurface() = default;
|
virtual ~ISurface() = default;
|
||||||
|
|
||||||
[[nodiscard]] virtual auto get_framebuffer_size() const -> math::uvec2 = 0;
|
[[nodiscard]] virtual auto get_framebuffer_size() const -> math::vec2_u32 = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ISwapchain
|
class ISwapchain
|
||||||
|
|
|
||||||
|
|
@ -702,9 +702,9 @@ struct Viewport
|
||||||
|
|
||||||
struct Rect2d
|
struct Rect2d
|
||||||
{
|
{
|
||||||
math::ivec2 offset;
|
math::vec2_i32 offset;
|
||||||
|
|
||||||
math::uvec2 extent;
|
math::vec2_u32 extent;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** There is no global state in Vulkan and all per-application state is stored in a VkInstance
|
/** There is no global state in Vulkan and all per-application state is stored in a VkInstance
|
||||||
|
|
@ -809,11 +809,11 @@ public:
|
||||||
|
|
||||||
u32 max_image_count;
|
u32 max_image_count;
|
||||||
|
|
||||||
math::uvec2 current_extent;
|
math::vec2_u32 current_extent;
|
||||||
|
|
||||||
math::uvec2 min_image_extent;
|
math::vec2_u32 min_image_extent;
|
||||||
|
|
||||||
math::uvec2 max_image_extent;
|
math::vec2_u32 max_image_extent;
|
||||||
|
|
||||||
u32 max_image_array_layers;
|
u32 max_image_array_layers;
|
||||||
|
|
||||||
|
|
@ -1126,7 +1126,7 @@ public:
|
||||||
QueueFlags::T queue_flags {};
|
QueueFlags::T queue_flags {};
|
||||||
u32 queue_count {};
|
u32 queue_count {};
|
||||||
u32 timestamp_valid_bits {};
|
u32 timestamp_valid_bits {};
|
||||||
math::uvec3 min_image_transfer_granularity;
|
math::vec3_u32 min_image_transfer_granularity;
|
||||||
};
|
};
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
|
|
@ -2306,9 +2306,9 @@ public:
|
||||||
Flags resolve_mode_flags;
|
Flags resolve_mode_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
math::ivec2 area_offset;
|
math::vec2_i32 area_offset;
|
||||||
|
|
||||||
math::uvec2 area_extent;
|
math::vec2_u32 area_extent;
|
||||||
|
|
||||||
std::vector<AttachmentInfo> color_attachments;
|
std::vector<AttachmentInfo> color_attachments;
|
||||||
};
|
};
|
||||||
|
|
@ -2459,7 +2459,7 @@ public:
|
||||||
|
|
||||||
ColorSpace color_space;
|
ColorSpace color_space;
|
||||||
|
|
||||||
math::uvec2 extent;
|
math::vec2_u32 extent;
|
||||||
|
|
||||||
u32 min_image_count;
|
u32 min_image_count;
|
||||||
|
|
||||||
|
|
@ -3571,7 +3571,7 @@ Surface::~Surface()
|
||||||
.queue_flags = static_cast<QueueFlags::T>(vk_property.queueFlags),
|
.queue_flags = static_cast<QueueFlags::T>(vk_property.queueFlags),
|
||||||
.queue_count = vk_property.queueCount,
|
.queue_count = vk_property.queueCount,
|
||||||
.timestamp_valid_bits = vk_property.timestampValidBits,
|
.timestamp_valid_bits = vk_property.timestampValidBits,
|
||||||
.min_image_transfer_granularity = math::uvec3{
|
.min_image_transfer_granularity = math::vec3_u32{
|
||||||
vk_property.minImageTransferGranularity.width,
|
vk_property.minImageTransferGranularity.width,
|
||||||
vk_property.minImageTransferGranularity.height,
|
vk_property.minImageTransferGranularity.height,
|
||||||
vk_property.minImageTransferGranularity.depth,
|
vk_property.minImageTransferGranularity.depth,
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ private:
|
||||||
|
|
||||||
std::vector<vk::Semaphore> m_submit_semaphores;
|
std::vector<vk::Semaphore> m_submit_semaphores;
|
||||||
|
|
||||||
math::uvec2 m_resolution;
|
math::vec2_u32 m_resolution;
|
||||||
|
|
||||||
FrameConstants m_frame_constants;
|
FrameConstants m_frame_constants;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ public:
|
||||||
return m_surface;
|
return m_surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] auto get_framebuffer_size() const -> math::uvec2 override;
|
[[nodiscard]] auto get_framebuffer_size() const -> math::vec2_u32 override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
vk::Surface m_surface;
|
vk::Surface m_surface;
|
||||||
|
|
@ -78,7 +78,7 @@ Surface::Surface(IInstance *instance, const ecs::Entity &surface_entity)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] auto Surface::get_framebuffer_size() const -> math::uvec2
|
[[nodiscard]] auto Surface::get_framebuffer_size() const -> math::vec2_u32
|
||||||
{
|
{
|
||||||
return m_surface_entity.get<surface::SurfaceComponent>().get_resolution();
|
return m_surface_entity.get<surface::SurfaceComponent>().get_resolution();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public:
|
||||||
return m_swapchain;
|
return m_swapchain;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] auto get_resolution() const -> math::uvec2
|
[[nodiscard]] auto get_resolution() const -> math::vec2_u32
|
||||||
{
|
{
|
||||||
return m_resolution;
|
return m_resolution;
|
||||||
}
|
}
|
||||||
|
|
@ -66,7 +66,7 @@ private:
|
||||||
|
|
||||||
std::vector<vk::ImageView> m_image_views;
|
std::vector<vk::ImageView> m_image_views;
|
||||||
|
|
||||||
math::uvec2 m_resolution {};
|
math::vec2_u32 m_resolution {};
|
||||||
|
|
||||||
vk::Format m_format {};
|
vk::Format m_format {};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ public:
|
||||||
{
|
{
|
||||||
std::string_view title;
|
std::string_view title;
|
||||||
|
|
||||||
math::uvec2 resolution;
|
math::vec2_u32 resolution;
|
||||||
|
|
||||||
bool vsync;
|
bool vsync;
|
||||||
|
|
||||||
|
|
@ -78,12 +78,12 @@ public:
|
||||||
return m_title;
|
return m_title;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] auto get_resolution() const -> const math::uvec2 &
|
[[nodiscard]] auto get_resolution() const -> const math::vec2_u32 &
|
||||||
{
|
{
|
||||||
return m_resolution;
|
return m_resolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] auto get_position() const -> const math::ivec2 &
|
[[nodiscard]] auto get_position() const -> const math::vec2_i32 &
|
||||||
{
|
{
|
||||||
return m_position;
|
return m_position;
|
||||||
}
|
}
|
||||||
|
|
@ -136,9 +136,9 @@ private:
|
||||||
|
|
||||||
std::string m_title;
|
std::string m_title;
|
||||||
|
|
||||||
math::uvec2 m_resolution;
|
math::vec2_u32 m_resolution;
|
||||||
|
|
||||||
math::ivec2 m_position;
|
math::vec2_i32 m_position;
|
||||||
|
|
||||||
bool m_vsync;
|
bool m_vsync;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] auto get_position() const -> const math::ivec2 &
|
[[nodiscard]] auto get_position() const -> const math::vec2_i32 &
|
||||||
{
|
{
|
||||||
return m_position;
|
return m_position;
|
||||||
}
|
}
|
||||||
|
|
@ -213,7 +213,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
math::ivec2 m_position;
|
math::vec2_i32 m_position;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ResizedEvent
|
class ResizedEvent
|
||||||
|
|
@ -223,7 +223,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] auto get_size() const -> const math::uvec2 &
|
[[nodiscard]] auto get_size() const -> const math::vec2_u32 &
|
||||||
{
|
{
|
||||||
return m_size;
|
return m_size;
|
||||||
}
|
}
|
||||||
|
|
@ -234,7 +234,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
math::uvec2 m_size;
|
math::vec2_u32 m_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LostFocusEvent
|
class LostFocusEvent
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,12 @@ struct ModifyTitleRequest
|
||||||
|
|
||||||
struct ModifyResolutionRequest
|
struct ModifyResolutionRequest
|
||||||
{
|
{
|
||||||
math::uvec2 resolution;
|
math::vec2_u32 resolution;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ModifyPositionRequest
|
struct ModifyPositionRequest
|
||||||
{
|
{
|
||||||
math::ivec2 position;
|
math::vec2_i32 position;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ModifyVisibilityRequest
|
struct ModifyVisibilityRequest
|
||||||
|
|
|
||||||
|
|
@ -150,9 +150,9 @@ private:
|
||||||
|
|
||||||
void modify_visiblity(SurfaceComponent &surface, const ModifyVisibilityRequest &request);
|
void modify_visiblity(SurfaceComponent &surface, const ModifyVisibilityRequest &request);
|
||||||
|
|
||||||
void modify_position(ecs::EntityId surface_entity, const math::ivec2 &new_size);
|
void modify_position(ecs::EntityId surface_entity, const math::vec2_i32 &new_size);
|
||||||
|
|
||||||
void modify_position(ecs::EntityId surface_entity, const math::uvec2 &new_size);
|
void modify_position(ecs::EntityId surface_entity, const math::vec2_u32 &new_size);
|
||||||
|
|
||||||
void set_visibility(ecs::EntityId surface_entity, bool visible);
|
void set_visibility(ecs::EntityId surface_entity, bool visible);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -227,8 +227,8 @@ Suite tick = "ticking"_suite = [] {
|
||||||
auto system = System { fixture.registry() };
|
auto system = System { fixture.registry() };
|
||||||
auto &surface = **fixture.create_component();
|
auto &surface = **fixture.create_component();
|
||||||
|
|
||||||
constexpr auto position = lt::math::ivec2 { 50, 50 };
|
constexpr auto position = lt::math::vec2_i32 { 50, 50 };
|
||||||
constexpr auto resolution = lt::math::uvec2 { width, height };
|
constexpr auto resolution = lt::math::vec2_u32 { width, height };
|
||||||
|
|
||||||
expect_eq(surface.peek_requests().size(), 0);
|
expect_eq(surface.peek_requests().size(), 0);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue