81 Commits

Author SHA1 Message Date
f3807f1557 Rename NOVA_LOG to NOVA_INFO 2025-09-07 18:23:57 +10:00
21cf49a1f9 Implement basic WindowDriver for Windows platform 2025-09-07 02:21:46 +10:00
ba30cc49d5 Use std::string when setting Window title instead of std::string_view 2025-09-07 02:21:45 +10:00
829a00bab8 Remove missing header 2025-09-07 02:14:25 +10:00
e7f2103fff Bump CMake and C++ versions 2025-06-26 22:15:30 +10:00
db7d50c371 Refactor various headers 2025-06-26 22:00:28 +10:00
04eec1b703 Use [[nodiscard]] attribute more sparingly
Removed all uses of the [[nodiscard]] attribute unless ignoring the
return value would lead to an error or leak e.g. memory allocations.
2025-06-26 20:28:21 +10:00
d89f8de08f Move WindowDriver implementations to platform folder 2025-06-21 01:23:54 +10:00
ccd5306636 Use std::any_of to check all surfaces in RenderDevice::choose_device() 2025-05-09 17:09:04 +10:00
b25e5936e2 Add prefer discrete logic to RenderDevice::choose_device() 2025-05-09 16:10:16 +10:00
fd5cdbf692 Correctly check if device/queue supports presenting to surface 2025-05-09 15:58:13 +10:00
b4284fb6ee Remove logging for object creation and only use trace for debug builds
Previously, everytime a object was created in the RenderDriver a message
was logged, e.g. "VkDevice created". These have been removed as they are
redundant as the opposite case (when warnings/errors occur) are always
logged. Aditionally, only enabled trace logging when Debug::is_debug()
returns true.
2025-05-09 10:56:33 +10:00
445604b63e Update editor main 2025-05-04 02:57:11 +10:00
7a18fbc7ae Use std::numeric_limits in RenderDevice 2025-05-04 02:55:08 +10:00
49a0a4b78a Add proper queue init and fetch functionality to RenderDriver 2025-05-04 02:54:06 +10:00
7039fdf93e Misc bug and typo fixes 2025-05-03 17:28:47 +10:00
e18d165217 Add Queue, CommandPool and CommandBuffer functions to RenderDriver 2025-05-01 01:35:25 +10:00
e45aab4475 Updated editor main 2025-04-30 18:02:09 +10:00
712d4d60e5 Add Framebuffer creation to RenderDriver::resize_swapchain() 2025-04-30 17:48:05 +10:00
8d4128cbc5 Add temporary color blend attachment to any pipelines
Temorarily added a color blend attachment to all pipelines created. This
is because, for now atleast, all pipelines are created using the
swapchain render pass, meaning they need atleast one color blend
attachment.
2025-04-30 17:36:23 +10:00
22f9878d38 Add RenderPass creation to RenderDriver::create_swapchain() 2025-04-30 17:21:46 +10:00
771363bbfe Fix Window CLOSED event when using more than one window
Fixed an issue where if there were more than one window, when they were
closed, the CLOSED event would trigger but the window count did not
decrease. This happened because after the window was destroyed the
DestroyNotify event was triggered, which when looked up in the m_windows
map, reinserted itself with default initialization.
2025-04-30 02:52:29 +10:00
49567a22a9 Update editor main 2025-04-23 00:32:03 +10:00
e710b80f36 Move ShaderStage and name into Shader struct
These fields will eventually be determined automatically but for now it
makes more sense to pass them as arguements to RenderDriver::create_shader.
2025-04-23 00:25:15 +10:00
74eba7266e Add VertexAttribute and VertexBinding to GraphicsPipelineParams 2025-04-23 00:08:35 +10:00
4bcabdebd1 Add RenderDriver::create_render_pass() stub 2025-04-22 19:00:36 +10:00
8d398b9c00 Started implementing Pipeline system for RenderDriver 2025-04-22 13:04:14 +10:00
8ac7a46f53 Update editor main 2025-04-18 22:33:20 +10:00
c7249eeb62 Add create/destroy_shader functions to RenderDriver 2025-04-18 22:27:15 +10:00
47a07ea6a8 Add create/resize/destroy_swapchain functions to RenderDriver 2025-04-18 20:43:17 +10:00
b23d2d9c3c Add Vec2, Vec3 and Vec4 structs (incomplete) 2025-04-17 02:07:40 +10:00
1f43f629e2 Add pragma.h header for various long pragma definitions
e.g. NOVA_BEGIN/END_ALLOW_ANONYMOUS_TYPES
2025-04-17 02:00:33 +10:00
66b9542053 Add NOVA_COMPILER_GCC/CLANG/MSVC definition to CMakeLists 2025-04-17 01:59:50 +10:00
4c6712e2fe Redefine ID types to be actual pointers
Redefined various ID types to be aliases of pointers instead of casting
a uintptr_t to the needed pointer.

e.g. SurfaceID = Surface*
2025-04-16 23:46:00 +10:00
546c485e1e Set CMAKE_CXX_VISIBILITY_PRESET to hidden
Can reduce binary size and even sometimes increase performance.

See: https://youtu.be/vtz8S10hGuc
2025-04-13 10:09:51 +10:00
b003eca687 Rename WindowAPI::WIN32 to WindowAPI::WINDOWS
Renamed to avoid conflict with WIN32 macro when compiling on Windows.
2025-04-13 10:06:23 +10:00
859547570b Rename local parameter variables to use p_ prefix 2025-04-13 10:04:53 +10:00
8efa200e9e Add _check_device_capabilities stub function 2025-04-12 20:39:16 +10:00
05a3fd7818 Update editor main 2025-04-12 20:32:10 +10:00
930bba636e Check surface support when choosing device 2025-04-12 20:27:30 +10:00
6cbf8df17a Add get_api() and get_api_name() to WindowDriver 2025-04-12 10:32:30 +10:00
1849593dfc Detect window resize events and update editor main 2025-04-12 10:11:48 +10:00
6e1393ce64 Add basic surface handling to RenderDriver and WindowDriver
This will likely require significant rework but it will do for now. A
considerations worth thinking about:

- What happends when the WindowDriver destroys a window, what happens to
  the corresponding surface?
2025-04-10 17:53:48 +10:00
536a1e8773 Misc fixes 2025-04-08 22:10:07 +10:00
2192a8ba10 Update editor main 2025-04-08 18:57:11 +10:00
6055ae1ebc Add WindowDriver::beep function 2025-04-08 18:55:27 +10:00
9ab1b306b3 Rename RenderDriver::create_device to RenderDriver::select_device 2025-04-08 18:43:06 +10:00
608af1b866 Moved RenderDriver/WindorDriver init code to static create functions 2025-04-08 18:24:33 +10:00
286dd0fb0e Add basic Window creation to X11WindowDriver 2025-04-05 07:07:54 +10:00
5e7c94ba8f Rename SystemDriver to WindowDriver and removed LinuxSystemDriver
Hopefully the last time I change my mind on what I want these to be
called. Reason behind this change is to minimize scope of a single
module. The WindowDriver should really only handle stuff related to
windows. If we need OS level functionality (e.g. get_os_name), that
should be the responsibility of the OS driver (or whatever that ends
being called). Remember, composition over inheritance.
2025-04-03 04:47:22 +10:00