f790b83c37
Fix up macOS SDL backend to accodomate the new engine base data
2022-06-27 10:09:07 -04:00
ca2c2c9d3d
Move all engine-specific models, materials etc. to a new base directory
...
This is a huge change, and basically breaks everything (as per usual!)
First of, this includes stuff like shaders so anything involving those
are broken and then fixed. A new BuildAssets cmake file is added to
aid in running AssetCompiler, and it seems to work fine on the engine
base assets.
The File API will eventually be revamped to handle this new way of
organizing the files and domains will eventually be gotten rid of all
together since I probably will replace it with game directory
priorities. As it stands right now, there isn't a way to easily
replace say - render_options.cfg with your own game-specific version.
Apple builds are probably broken by this commit (since I'm moving
around content and shader directories) to be fixed later.
2022-05-21 18:28:48 -04:00
cbf1246e2f
Change some references to "data" to the new "game" directory
...
This isn't comprehensive, but will get some things to work.
2022-05-21 17:49:24 -04:00
6645549da4
Fix bug in SDL platform code that could result in things crashing
...
The current app is now properly set, which is used in the model compiler
for example in its app_main.
2022-05-21 17:47:53 -04:00
5db6f02742
Actually use SKIP_DATA variable when adding platform executable
2022-05-21 17:47:15 -04:00
7a53ce8db4
Don't use a dummy vulkan window when initializing SDL backend
2022-04-04 09:36:11 -04:00
d219f0c85b
Handle data directories for games not named example, and also support out of tree builds
2022-03-09 18:17:04 -05:00
982ef5090c
Fixup MoltenVK support
...
This makes MoltenVK work on iOS again if you
have #1539 applied :-)
2022-03-06 17:22:15 -05:00
33680efe7b
Appease MSVC
2022-03-04 19:17:07 -05:00
7f479b0e0b
Properly copy data on macOS
...
This also fixes cfg init failing on macOS
2022-02-22 09:34:00 -05:00
5d0f629ca7
Remove hardcoded path (wow)
...
great programming only happens here
2022-02-22 09:28:45 -05:00
312de5312c
Attempt to fix CI build
2022-02-21 18:18:19 -05:00
e1c688bea7
Completely overhaul shader generation, again
...
Now it's even simpler, and it now generates multiple
shader languages at once! The copying mechanism is now
much simpler on non-mac platforms as well. HLSL is also now a supported shader target language.
2022-02-21 18:07:22 -05:00
4f75d09eaf
Move data folder into example directory
2022-02-21 17:37:10 -05:00
e5fddf2c67
Fixup merge
2022-02-21 15:55:11 -05:00
5c8b690d66
Merge remote-tracking branch 'origin/master'
2022-02-21 15:54:17 -05:00
6be0616d1e
Use DX12 by default on Windows
2022-02-21 15:53:42 -05:00
ba4d15886f
Protect against MinGW including Windows RT
2022-02-21 15:41:42 -05:00
5401188196
Allow overriding the gfx backend at runtime
...
You can now specify -vulkan, -metal, etc to the SDL backend.
2022-02-21 12:27:29 -05:00
138cbf3f4b
Now try Metal, Vulkan and then finally Dummy in that order
...
This only applies to the SDL backend though, this will be expanded
upon though.
2022-02-21 12:09:43 -05:00
ca57de8f99
Support GFX dummy a little better
...
There's now more checks to prevent crashing when the
mapped buffer is actually null, like when running with the dummy
backend.
2022-02-21 12:09:14 -05:00
9b507aa79a
Fix up macOS build
2022-02-21 11:47:23 -05:00
54c95b9ddd
Link against SDL2::SDL2 if found
2022-02-21 11:09:55 -05:00
a3704eb7a9
Improve surface and gfx context creation
...
This is laying some groundwork for a much better way
of determining the best GFX api to use at runtime, and
making it easier to support more GFX backends in the future.
2022-02-21 11:03:34 -05:00
6d9602b12a
When building on Linux, prefer using the SDL2 config module
...
This is shipped by SDL2 itself, so it should be the preferred way
of finding it. Since SDL2 does not ship it in their Windows
development libraries, we still need to use the regular Find module.
2022-02-21 07:53:08 -05:00
8237eeb05b
Fix Metal backend (finally)
2022-02-18 14:36:38 -05:00
86a51e259d
Only link to GFXMetal when metal is enabled
2022-02-18 08:44:17 -05:00
93c2639539
Enable Metal by default on SDL backend
2022-02-15 11:29:56 -05:00
6935f85351
Start work on converting GFXMetal to metal-cpp
2022-02-15 11:25:13 -05:00
374d8f7b63
Use SDL_GetBasePath() on macOS
2022-02-07 09:58:13 -05:00
420e8cbea9
Fix ninja multiple dummy generation error
2022-02-03 09:15:04 -05:00
redstrate
ef15b62af1
Fix window sizing not working under SDL
2021-10-14 17:30:04 -04:00
redstrate
d8cf9bd734
Use SDL's relative mouse mode when capturing the mouse
2021-10-14 17:15:11 -04:00
redstrate
e79a98c7d2
Some minor code refactoring
2021-10-14 08:51:58 -04:00
redstrate
5226aa1200
Add hidden window flag, to be in line with how imgui's sdl backend works
2021-10-13 10:55:20 -04:00
redstrate
fd4661088a
Fix HiDPI support
2021-10-12 11:42:10 -04:00
redstrate
7d6ded0d69
Set HiDPI flag for all SDL windows
2021-10-12 11:12:51 -04:00
redstrate
a2f81d7ca7
Allow better DPI handling under SDL, handle external resize events in imgui
2021-10-12 11:06:59 -04:00
redstrate
c6bc56d033
Change window handles into opaque pointers
2021-10-12 10:22:16 -04:00
redstrate
182fbe195a
Add imgui open/save dialog
2021-10-11 13:39:15 -04:00
redstrate
9c8c257c43
Add new console debug window, handle text input under sdl
2021-10-07 17:46:28 -04:00
redstrate
648d2968d4
Update Info.plist
2021-09-13 22:59:56 -04:00
redstrate
f213d3d548
Fix resource path handling on macOS
2021-09-13 17:19:59 -04:00
redstrate
4680579899
Remove macOS Cocoa and Metal backends
2021-09-13 13:47:29 -04:00
redstrate
cb93aaf83d
Call prepare_quit() properly on SDL platform, and return a valid writeable directory
2021-06-01 12:44:16 -04:00
redstrate
fa65e99094
Rename Path -> path
2021-05-12 09:05:56 -04:00
redstrate
01966c1d81
Rename File -> file and move under the prism namespace
2021-05-12 08:50:02 -04:00
redstrate
fe81222ea7
SDL backend now provides an accurate delta time
2021-05-11 17:38:09 -04:00
redstrate
2ddc1e1794
Fix up SDL2 mouse and key handling for imgui
2021-05-11 17:05:29 -04:00
redstrate
465297442a
Copy shader files properly on SDL2 apps
2021-05-11 16:32:59 -04:00