-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake changes for Visualiser #219
Conversation
Now have it working with a simple fixed example, I haven't commit these changes due to the large amount of dependency hell I need to cleanup (to save polluting the vis repo). Brief video demo here: https://youtu.be/-W7fkSgg3IM (poor quality because youtube has downscaled from 1440p to 1080p) Jobs Todo:
Mostly the dependency stuff tied to CMake I want to fix before putting these changes on git. |
I'm happy to test / fix this on linux once it's worth doing. The SDL installation wiki suggests using the distribution provided copy rather than building your own copy. This should just be looking for SDL2, and if not found but requested building it at that point in time. As an aside we might want to think about offline builds. I.e. what if you have a local copy of gtest but due to lack of internet the download fails? This is probably worthy of an isse? |
I'd wait until the todo list is completed, some of that cleanup should simplify any issues you'll need to address.
SDL already works like that, I haven't looked into freetype or glew yet.
That's not too impactful, I've already done that for the FGPU2_vis include, so I can dev it not in a weird nested folder. |
It should now be possible to build the visualisation on windows via the main FGPU2 cmake. Running might be a challenge due to the resource paths for shader/model, which are currently hardcoded to paths on my machine. |
Should start build a list of configuration options to add support for: (feel free to edit this comment with suggestions) P.S. Re the Agent/AgentState, i'm a fan of agent states reverting to agent defaults for any values not set through the state, even if the agent setting is updated after the agent state is created. However this is programatically icky to implement (e.g. an additional bool flag per var, as far as i can tell). Model/Window Level:
Agent/AgentState Level:
Misc: |
Started working on agent customisation, model path and scale (1d or 3d) can be chosen. Need to also allow this to be customised on per agent-state basis. Scale isn't really worth using until env scale options are in place (shader is still hardcoded to multiply agent locs by some constant atm). |
VISUALISATION_ROOT cmake var to skip pulling in vis repo Initial vis config (model path/scale, window size/title) Remove primage visualiser support from circles model
From today's meeting Paul wants a minimal functional version, so that I can move onto submodels. I think the key things remaining for this are:
Should all be quite trivial to complete |
Possibly room for other improvements to thread safety
Might want tweaking, currently returns an object containing a reference to something inside a list. If the list resizes, no guarntee reference won't be invalidated.
I'm happy for this to be merged now. Maybe a case for squashing the final few commits. and updating messages on others to clarify visualisation.
|
Closes #69
These changes enable
VISUALISATION
flag to be set at CMake time.This flag pulls in the visualiser repo and marks it as a dependency of FGPU2, configures include dirs and copies SDL.dll on compilation success.
Have tested it with the root CMake project, and added it/tested with example ones too.
This should probably remain draft until the visualiser is ready, and an example has an optional vis.
Two possible remaining tasks:
VISUALISATION
is setON
all examples/tests will be setup to have visualiser enabled, even if they don't require it. Probably not a big deal but notable.