Commit Graph

93 Commits

Author SHA1 Message Date
Graham Pentheny
fb5e567ace Consolidate some constants 2025-08-03 19:16:38 -04:00
Graham Pentheny
12ce3c2368 Removed unnecessary accessors 2025-07-29 23:16:14 -04:00
Graham Pentheny
50381dd2a6 Fixed UI window sizing, positioning, resizability 2025-07-29 02:09:59 -04:00
Graham Pentheny
27e72712f6 Simplify some UI rendering conditionals 2025-07-29 02:03:27 -04:00
Graham Pentheny
0d05f532ce Enable high-DPI support 2025-07-29 01:56:23 -04:00
Graham Pentheny
fc32610aa5 renamed some variables 2025-07-29 00:22:35 -04:00
Graham Pentheny
32d6e1640b Remove some usings since they're a bit unnecessary 2025-07-29 00:19:44 -04:00
Graham Pentheny
c87a4b3056 Removed unnecessary build context setter 2025-07-22 01:02:41 -04:00
Graham Pentheny
8c75eeed3c Removed unnecessary accessor for inputGeometry 2025-07-21 01:12:19 -04:00
Graham Pentheny
a94dee954d More code cleanup
# Conflicts:
#	RecastDemo/Include/InputGeom.h
#	RecastDemo/Include/SampleInterfaces.h
2025-07-19 11:53:01 -04:00
Graham Pentheny
cbbbad99a1 Convert file IO to use FileIO class in SampleInterfaces.h
de-duping a lot of standard file IO
2025-07-19 11:47:13 -04:00
Graham Pentheny
95a7b45c32 More WIP DearImGUI conversion 2025-07-13 12:43:10 -04:00
Graham Pentheny
d534b4dc14 WIP DearImGui conversion 2025-07-12 15:02:54 -04:00
Graham Pentheny
6b906538dc WIP DearImGui conversion 2025-07-10 11:11:54 -04:00
Graham Pentheny
d1e513aeaf Remove MeshLoaderObj class. Replace with parseObjModel function 2025-07-07 00:54:57 -04:00
Graham Pentheny
758fb8e5d5 Silencing more value conversion warnings 2025-06-28 15:00:44 -04:00
Graham Pentheny
d647ba4305 Fixed compilation warnings treated as errors on Windows 2025-06-28 14:44:19 -04:00
Graham Pentheny
b5d961d4a1 Simplify scanDirectory functions
always append, and let the caller clear the vector themselves if they want.
2025-06-04 00:54:55 -04:00
Graham Pentheny
1d40e3b7ab Rename parameter names for Sample::handleClick 2025-06-02 23:34:20 -04:00
Graham Pentheny
67421b6091 cleanup mesh loading 2025-05-30 01:37:05 -04:00
Graham Pentheny
8d5ec7d4c7 Clean up and format main.cpp. Move some settings to the top-level 2025-05-19 23:23:20 -04:00
Graham Pentheny
66de897309 Move app state in main.cpp into a struct
In anticipation of moving to SDL3 where this is the pattern.
2025-05-19 23:19:25 -04:00
Graham Pentheny
8a7d20b842 More main.cpp formatting 2025-04-27 16:45:23 -04:00
Graham Pentheny
1dbb74dc5d Removed presentation mode flag from demo project 2025-04-27 15:50:35 -04:00
Graham Pentheny
578fb5fd95 reformatted main.cpp 2025-04-27 15:45:35 -04:00
Graham Pentheny
202c07e37a Removed debug sample 2025-04-26 00:32:27 -04:00
Graham Pentheny
11bdd85f77 remove trailing whitespace 2025-04-09 01:33:07 -04:00
Graham Pentheny
d3b058404f Cleanup includes in main.cpp 2025-03-29 14:06:32 -04:00
listenwind
1f0ce60544 feat: add window resizing support (#746)
- Add SDL_WINDOW_RESIZABLE flag to enable window resizing
- Handle SDL_WINDOWEVENT_RESIZED event to update window dimensions
- Update OpenGL viewport and projection matrix when window is resized

This change allows users to resize the application window while maintaining
proper aspect ratio and rendering.
2024-12-30 23:29:37 -05:00
Graham Pentheny
b43c82c808 Removed _USE_MATH_DEFINES directive (#596)
Since none of the `M_` prefixed constants are used anywhere in the code, this is unnecessary.  It's also Windows-specific, so these non-standard defines shouldn't be used anyway.

Ref: https://learn.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=msvc-170
2022-12-29 15:09:01 -05:00
Graham Pentheny
5111139558 Fixes for many low-severity compiler warnings (#576)
* Fixes for many low-severity compiler warnings

Mostly a lot of pedantic things like end-of-file newlines and commas on the last enum value.  However some fixes like the weak v-tables warnings fixes might help with code gen.  It's unclear if the linker is able to elide multiple copies of the same type's v-table in different translation units, (sometimes it can) but these fixes ensure we don't have to rely on it.
2022-11-11 21:03:03 -05:00
Graham Pentheny
0d1cbd3d67 Don't explicitly create a GL context since SDL_CreateWindowAndRenderer does it internally.
Having two GL contexts causes rendering problems on Ubuntu.  Fixes #521
2022-10-25 23:18:11 -04:00
Prin_E
5a870d427e Fixed RecastDemo crash in macOS 10.11+
* Set hints to always use OpenGL render driver (instead of Metal driver)
* Compile error fix in Xcode 13
2022-03-20 15:33:19 -04:00
Domenico Albani
ef3ea40f7a Add more camera movement key bindings (#259)
Q/E and Page up/page down to move vertically.
Arrow keys in addition to WASD to move normally.
2017-02-06 02:09:49 +01:00
Ben Hymers
f44e151556 Fix crashes and odd behaviour in RecastDemo on geometry load failure
Would crash if selecting a test with geometry then a test with missing geometry
Would use the previous sample type if selecting a sample that doesn't exist in the list
Two of the test cases had an incorrect sample name
2016-02-22 22:24:48 +00:00
Ben Hymers
aac9ae6e11 Remove SlideShow, and stb_image 2016-02-17 13:14:34 +00:00
Jakob Botsch Nielsen
a31da928ba Add settings storage to geometry sets
This adds the ability for geometry sets to store build settings that can
be automatically applied when they are loaded. This should allow sharing
of .gset files to demonstrate problems with certain settings on certain
files. It also allows people to diagnose problems more easily by being
able to dump their own triangle meshes and settings and load them in the
demo, with all of its visualization options. .gset files can be created
from the current mesh and settings by pressing the 9 key, which will
generate it in the same folder as the input mesh.

Also converts more of the demo to use STL.
2016-01-17 20:31:09 +01:00
Graham Pentheny
66c6060e95 Fix a bunch of compiler warnings
* Removed some unused vars
* Fixed some signed/unsigned comparison mismatch warnings
* Cast some int's to size_t when appropriate
* Removed some redundant casts
* silenced warnings about implicit conversions that lose precision
* changed origMousePos to an array of ints to match mousePos
2016-01-10 22:41:38 -05:00
Graham Pentheny
e5f9f21b30 Removed FileList class and replaced it with std::vector<std::string> in RecastDemo 2016-01-07 18:34:18 -05:00
Graham Pentheny
512ec1fdfd Unit testing framework.
* Tests live in a "Tests" folder alongside the other components.  Inside the "Tests" folder, tests are split into folders by the component they test.  For example, the example unit test of "rcVdot" (which is implmemented in Recast/Recast.h) lives in "Tests/Recast/Tests_Recast.h".
* Uses the Catch testing framework
* One example test of "rcVdot"
* Tests are run on Travis and Appveyor after every build.  Failing unit tests will fail the build in both case.
* Added instructions on running unit tests to the readme
2016-01-06 18:22:39 -05:00
Graham Pentheny
2eb3abfb60 Updated RecastDemo to SDL2
* Renamed a bunch of variables in main.cpp to be more descriptive.
* Removed unnecessary SDLMain.h and SDLMain.m OSX objective-c class as well as the plist, strings, xib and icns files, which are not needed.
* included cstdio in imguiRenderGL since SDL2 doesn't do it for us.
* Updated premake5 script to support SDL2 and to set the debug directory, as well as copy the SDL2.dll to the target directory on Windows.
* Updated readme with more descriptive, platform-specific demo project setup instructions
* Updated appveyor build script to build vs2015 as well.
* Updated Travis build script to build SDL2 from source, because they use Ubuntu 12.04 which doesn't have the libsdl2-dev package in its repositories.
2016-01-04 18:56:51 -05:00
Jonathan Adamczewski
c98c31f33b Constrain the window's aspect ratio 2014-03-23 23:53:57 -07:00
Mikko Mononen
6702143bc1 Fix for broken raycasts, changes how findNearestPoly works, slight API change
- test case supports raycasts
- changes how findNearestPoly works directly over polygons
- API change: findNearestPoly has additional parameter
2014-02-11 20:32:00 +02:00
Mikko Mononen
e6b1d141d2 Fixed warnings when compiling with -Wshadow. 2012-02-22 17:25:46 +00:00
Mikko Mononen
1b6ca5a94a Fixed findStraightPath() to return partial results. Fixed main.cpp FPS throttling. Added initial support for path replanning in DetourCrowd. 2011-08-01 10:48:56 +00:00
Mikko Mononen
76444aa747 - Updated win32 project
- Fixed VC compile errors
2011-03-25 10:13:27 +00:00
Mikko Mononen
9f2390e196 Added mipmaps to the grid texture. Removed obsolete SoloMeshTiled sample. 2011-03-06 16:00:04 +00:00
Mikko Mononen
e84d563bfe Added boxmapped texturing to input mesh, helps visualize it better. Added polymesh generation for layered heighfields. 2011-03-06 15:40:33 +00:00
Mikko Mononen
d1dde08d35 Added delay to make sure the app does not hog all CPU. 2011-02-25 08:24:30 +00:00
Mikko Mononen
e70a4664c9 Added multisampling. Moved obstacle avoidance to DetourCrowd. 2011-01-29 15:39:42 +00:00