Commit Graph

330 Commits (071518732e1dd684bf0e2f99c8ccdcaec59cb23a)

Author SHA1 Message Date
cosmonaut 40d12357c0 Remove MoonWorks.Collision (#46)
After months of tweaking and refactoring I have realized that collision is like rendering - it's so fundamental to the structure of your game that making broad decisions about how it should work from a library level is too restrictive and difficult to optimize. Anyone skilled enough to use MoonWorks should be easily able to roll their own collision detection.

Reviewed-on: MoonsideGames/MoonWorks#46
2023-02-03 19:51:36 +00:00
evan e52fe60657 update RefreshCS 2023-01-31 12:29:17 -08:00
TheSpydog b39526ca90 Textures now have a sample count, not render passes (#45)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#45
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-31 20:27:26 +00:00
TheSpydog 88d9119830 Remove warning from DrawInstancedPrimitives doc comment (#44)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#44
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-24 00:14:46 +00:00
TheSpydog 05de9a4066 Make video shaders optional and search for them in the root output directory (#42)
Whenever the video shaders change, they can be rebuilt with refreshc and distributed alongside the moonlibs.

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#42
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-21 23:37:01 +00:00
TheSpydog b1d30a9e6c Remove isFixed param from AcquireCommandBuffer call (#41)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#41
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-14 18:04:53 +00:00
TheSpydog 030745361b Fix BC7 loading for textures without DDSD_CAPS/FMT (#40)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#40
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-07 01:46:59 +00:00
cosmonaut c43df10c2a vertex binding API improvements 2023-01-05 13:41:48 -08:00
cosmonaut 95981f0f03 rework vertex input state creation to avoid reflection 2023-01-04 17:34:01 -08:00
cosmonaut 703b694bf6 Refresh 1.10.0 2023-01-04 11:35:31 -08:00
cosmonaut fe561b61ef update libs 2023-01-04 11:34:54 -08:00
TheSpydog 230c1b41b4 Add IndirectDrawCommand struct (#39)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#39
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-04 18:44:56 +00:00
cosmonaut 1fb3e5adf0 update RefreshCS 2022-12-28 19:24:08 -08:00
TheSpydog 6f8858c8b7 RasterizerState / BlendFactor ABI break (#38)
Updates the APIs to match [this Refresh PR](MoonsideGames/Refresh#27).

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#38
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-12-29 03:22:47 +00:00
TheSpydog f96298f991 Add validation checks for AcquireSwapchainTexture and BindVertexBuffers (#37)
This replaces the Refresh-side check for window claim status in AcquireSwapchainTexture, and adds validation to ensure that BindVertexBuffers is not called before BindGraphicsPipeline.

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#37
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-12-29 03:18:36 +00:00
cosmonaut d76633bdfc change sizeof calls to Marshal.SizeOf in interop situations 2022-12-13 19:01:40 -08:00
cosmonaut debb76f62a validate scissor dimensions 2022-12-13 16:09:32 -08:00
cosmonaut ca61e94b13 optimize mouse update 2022-12-13 15:13:43 -08:00
cosmonaut 36e6c6f332 optimize AcquireSwapchainTexture 2022-12-13 00:52:35 -08:00
cosmonaut 916962da6c garbage collection optimizations 2022-12-13 00:34:16 -08:00
cosmonaut cfd52b00bd add FIXME note for spatial hash boxing 2022-12-08 13:29:04 -08:00
cosmonaut b0e1ad3cf8 add note about disposing swapchain texture 2022-12-01 13:20:11 -08:00
cosmonaut 2c4e1b972a .NET 7 2022-11-30 10:01:09 -08:00
cosmonaut 751b8310ce Fix crash when no audio device found 2022-11-30 09:43:49 -08:00
cosmonaut 474b8fe37d only check depth format if there is a depth attachment 2022-11-29 13:06:03 -08:00
cosmonaut bc41d2c079 add IsIdle and IsUp to Keyboard 2022-11-28 10:19:03 -08:00
cosmonaut d5ddd44bd3 add IsIdle and IsUp to VirtualButton 2022-11-28 00:48:48 -08:00
cosmonaut de9d13757a distinguish between idle and released on buttons 2022-11-27 12:41:09 -08:00
cosmonaut ca9fb45536 fix spacing 2022-11-18 10:34:32 -08:00
cosmonaut faf81bceed add support for mouse X1 and X2 buttons (#36)
Reviewed-on: MoonsideGames/MoonWorks#36
2022-11-18 18:33:15 +00:00
cosmonaut fa992652b1 fix mouse button updating twice 2022-11-17 18:16:26 -08:00
marpe c4bae77408 Fix infinite recursion on certain Easing functions 2022-11-17 14:40:24 -08:00
cosmonaut ecf1a8ed55 Optimize CommandBuffer (#35)
- remove params methods in favor of overloads and last-resort `in Span<T>` overloads
- add `in` to params that take structs to reduce unnecessary copying
- Buffer can now implicitly cast to BufferBinding
- add render pass / graphics pipeline format match validation

Reviewed-on: MoonsideGames/MoonWorks#35
2022-11-17 20:35:21 +00:00
cosmonaut 970517c3c2 add window size change callback support 2022-11-15 22:53:37 -08:00
cosmonaut f3c5bbf902 rename BorderlessWindow to BorderlessFullscreen 2022-11-15 22:49:07 -08:00
cosmonaut 02b20f79f5 allow sampler binding calls to take array segment 2022-11-15 17:53:30 -08:00
TheSpydog c2ef78d136 Add validation check that all work group dimension counts are >= 1 (#34)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#34
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-11-14 18:21:03 +00:00
TheSpydog 5533eeb2fd Fix bad pointer arithmetic in SetBufferData (#33)
Fixes a bug where SetBufferData was writing garbage to the buffer if `startElement` was non-zero.

Rather than fixing the pointer addition (it should have been `ptr + startElement`) I opted to remove it and instead pass the index explicitly when grabbing the address of the array element. I think that's a little easier to understand, and it's slightly safer too -- if you pass a startElement beyond the array bounds it will now throw an IndexOutOfRangeException instead of silently reading from outside the array bounds.

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#33
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-11-12 03:42:35 +00:00
cosmonaut 934f3fd623 Refresh 1.9.0 2022-11-09 12:14:33 -08:00
TheSpydog 02b0c12ad8 Bunch of Refresh API changes, plus more validation (#31)
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-11-09 18:49:53 +00:00
TheSpydog 1b38f8606b Added more graphics validation, misc api tweaks (#30)
* Refactored render pass attachment validation to avoid copy-pasting the asserts
* Added validation for texture usage flags and null textures/samplers
* Added an exception for when GraphicsPipeline/ComputePipeline creation fails
* Changed TextureSamplerBinding so that it holds references to the Texture and Sampler classes, rather than just their handles
* Removed the CommandBuffer.BindVertex/FragmentSamplers overloads that took a length parameter

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#30
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-11-08 19:29:05 +00:00
cosmonaut db38ada410 update dependency libraries 2022-11-01 16:33:26 -07:00
cosmonaut bd98ae8441 fix validation error when TextBatch is empty 2022-10-24 17:22:24 -07:00
cosmonaut 59190e619d fix Mouse.Wheel calculation 2022-10-21 11:39:06 -07:00
cosmonaut ea86212199 add AudioDevice.MasteringVolume property 2022-10-20 15:00:25 -07:00
cosmonaut 66c6ceec04 hide main window until Game.Run is called 2022-09-30 13:03:05 -07:00
cosmonaut dfddc24d0e add PresentMode to WindowCreateInfo 2022-09-30 13:02:51 -07:00
cosmonaut b66e077376 GraphicsDevice throw if backend invalid 2022-09-29 19:21:47 -07:00
cosmonaut 07c0b1b9a2 Window API revision + Framerate limiter (#27)
- add `Backend` enum
- `GraphicsDevice` can now take a preferred backend at creation

- add `GraphicsDevice.ClaimWindow`
- add `GraphicsDevice.UnclaimWindow`
- add `GraphicsDevice.SetPresentMode`

- add `Window.Claimed`
- add `Window.SwapchainFormat`
- fix certain odd behaviors in multi-window scenarios

- rename `FramerateSettings` to `FrameLimiterSettings`
- add `Game.SetFrameLimiter`

Reviewed-on: MoonsideGames/MoonWorks#27
2022-09-29 22:22:50 +00:00
TheSpydog 3ffdf8a929 Specify readonly access when creating ShaderModule stream (#26)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#26
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-09-28 23:52:29 +00:00