Jackalope / jen (public) (License: GPLv3 or later version) (since 2018-10-24) (hash sha1)
----> ABOUT:

3D rendering and computing framework based on Vulkan API.

Libraries:
- simdcpp submodule (see my simdcpp repo)
- jmath submodule (see my jmath repo)
- mesh (constexpr generation of cubes, spheres, icosahedrons subdivisions)
- atlas (1D lines and 2D rectangles cutting)
- jlib submodule (see my jlib repo)
- jrf submodule (see my jrf repo)
- vkw (Vulkan API C++ wrapper)
Modules:
- compute (run compute shaders on gpu)
- graphics (draw models with clustered forward rendering and onscreen text)
- resource manager (load meshes, models, textures, scene data from
files and create related objects in graphics module)

----> INSTALLING:

To download all the parts of this framework it's enough to launch
git clone with recursive flag:

$ git clone —recursive ssh://rocketgit@ssh.rocketgit.com/user/Jackalope/jen

After this look at git tags:

$ git tag

It is recommended to use a tagged version instead of the latest commit,
because the first commit after the tagged one mostly includes incompatible
parts of future changes for the next version.

$ git checkout v0.1.0

----> DEPENDENCIES:

To use JEN as CMake subdirectory and successfully build programs with it
you need to make sure you have all of its dependencies:
- compiler: Clang or GCC, support for C++17. Clang 10+ or GCC 9+ is recommended,
compiling on Windows OS is tricky and requires something like MinGW with MSYS,
there are also some complications to go through to make dependencies work;
- GLFW3 library, supported version is 3.2.1;
- FreeType library, if graphics module will be used;
- Vulkan API headers, and optional validation layers to debug sneaky problems,
you also need Vulkan support in your graphics driver to run compiled programs;
- LibZip can be necessary, if JRF is used to read zip files;
- CMake, for obvious reasons;
- glslangValidator to compile shader for the graphics module.

CMake must be able to find GLFW3, Vulkan and FreeType (for graphics)
with find_package().

----> HOW TO USE IT:

To use JEN, you need to add it as a subdirectory:

add_subdirecroty(${PATH_TO_JEN})

There are several configuration options:
- JEN_MODULE_COMPUTE - turn compute module on for compiling and including;
- JEN_MODULE_GRAPHICS - turn graphics module on ...;
- JEN_MULTITHREADED_DRAW_FRAME - draw_frame function will use thread pool queue
instead of linear executing;
- JEN_MODULE_RESOURCE_MANAGER - resource manager module ON, if graphics is ON;
- JEN_VLK_VALIDATION - enable Vulkan Validation Layers to debug some errors
related to JEN. This will often produce false-positive,
as well as true-positive errors.

Look in CMakeLists.txt at JenExamples repo for details on how to use and
configure JEN automatically:

$ git clone ssh://rocketgit@ssh.rocketgit.com/user/Jackalope/JenExamples

Also I recommend to compile and run examples to make sure it works correctly.

----> SUPPORTED HARDWARE:

JEN has not been tested well, because it requires running it on large amount of
different hardware to do so. It must work with mesa driver and modern
Intel i965 GPUs as well as AMD GPUs.


----> DOCUMENTATION:

You can generate Doxygen documentation, to do so
turn on any of JEN_DOXYGEN_* options and run documentation target in cmake:

$ cmake -G %1 -DJEN_DOXYGEN_HTML=ON -DJEN_DOXYGEN_LATEX=ON
$ cmake —build —target documentation

Resource manager is not documented because it still requires large enhancements.
List of commits:
Subject Hash Author Date (UTC)
added flag to wait events instead of polling for interactive apps b9cfe8faa84e5bfc00aa842b16819b28f5e2be10 Jackalope 2020-05-04 17:45:34
added compute info validation 7cd15af2afd064302703eccd1094f4353da35c4f Jackalope 2020-04-26 08:05:18
fixed uninitialized value 8313a622987f51e74b068231cddde3ff34a93625 Jackalope 2020-04-26 08:04:48
disable checking present support when graphics module not loaded b2ff208cef191444cd995c40989c6b9414c1fb9f Jackalope 2020-04-26 02:35:19
added debug extension loading when graphics module is disabled 54bc7c5eff1353559ec29e560a4095cfa9ef33d8 Jackalope 2020-04-26 02:32:45
Noise library: removed excess commentary lines 6b518ad33508161bd0cc8790eb13f4d03d827acc TheArtOfGriefing 2020-04-23 20:56:55
Noise library: added forgotten hash function use in gradient computation. bfce031f8de0410107aaf33009b46e455acd5095 TheArtOfGriefing 2020-04-23 18:40:05
Noise library update: +6 hash functions +1D,2D,3D,4D highly optimized simplex noise +1D,2D,3D,4D white noise 731cba496cf3c253ad365355faae9df45e1e714e TheArtOfGriefing 2020-04-23 17:37:19
simd library moved to simdcpp submodule, also updates to match new version 36fa65052847fbb258e0ceaf2a2c3fab40e5c3a7 Jackalope 2020-04-21 23:19:24
jlib update d7d711f8b289b2a84e58c66d20c0871c21d17350 Jackalope 2020-04-15 09:54:57
hiding clang-10 new warnings 6d3a1a1dbc928d9ed75024848f06f541d55e1580 Jackalope 2020-04-15 09:54:39
vkw new Vulkan API result values 0eed6a08e659a2e58ed35d9870022d235f0d87d4 Jackalope 2020-04-15 09:54:04
removed temporary fence, validation layers still complaining ba2b7277f0db6e549e68619f8f61ecc50066343d Jackalope 2020-04-15 09:41:02
device queues had incorrect orders in memory layout 28bf6b0e793ae988c390571baa5e8654200f6b42 Jackalope 2020-04-15 07:10:19
updated new vulkan enum names a7f4e2fdd01884df5469abda3520ca3901a44532 Jackalope 2020-04-15 07:09:55
fix gradient values in simplex noise 75ee283d9f06b69936c9db3d1eabe5c876b418cf Jackalope 2020-04-03 04:00:15
conditional device queues loading based on ModulesMask 952bb3a4d1ae3c867309b136543bbc7a072684bb Jackalope 2020-04-02 02:44:36
fixed issue when gpu_transfer is sleeping while jobs queued 7af01807ffbc1ffae785745378f832303bcf79dc Jackalope 2020-03-31 07:40:10
real_coordinate_to_face_simd correct face values 7fb655197ff078fcb11b144025e08f9bedaa3b5d Jackalope 2020-03-29 14:41:29
chenged cube faces enumeration order a02f523b115a2ada261f6b4e65042925ad1b042c Jackalope 2020-03-29 14:24:52
Commit b9cfe8faa84e5bfc00aa842b16819b28f5e2be10 - added flag to wait events instead of polling for interactive apps
Author: Jackalope
Author date (UTC): 2020-05-04 17:45
Committer name: Jackalope
Committer date (UTC): 2020-05-04 17:45
Parent(s): 7cd15af2afd064302703eccd1094f4353da35c4f
Signer:
Signing key:
Signing status: N
Tree: 62c5cc262b0dbf8c823f3a0326a4610b3d60e790
File Lines added Lines deleted
include/jen/framework.h 4 3
src/framework.cpp 8 5
File include/jen/framework.h changed (mode: 100644) (index 20eb9fb..c868263)
... ... namespace jen
18 18 { {
19 19 [[nodiscard]] bool init(ModulesMask modules_mask, const char *window_title); [[nodiscard]] bool init(ModulesMask modules_mask, const char *window_title);
20 20 void destroy(); void destroy();
21 void update_input();
21 void update_input(bool wait_events);
22 22 [[nodiscard]] bool draw_frame(const jl::rarray<const vk::Model> &models); [[nodiscard]] bool draw_frame(const jl::rarray<const vk::Model> &models);
23 23
24 24 template<typename P_F> template<typename P_F>
 
... ... namespace jen
46 46 models = {}; models = {};
47 47 draw = false; draw = false;
48 48 break_loop = false; break_loop = false;
49
49 wait_events = true;
50 50 last_update_time = jl::time::current(); last_update_time = jl::time::current();
51 51 elapsed_after_update = {}; elapsed_after_update = {};
52 52
 
... ... namespace jen
66 66 pause_hold = true; pause_hold = true;
67 67 } }
68 68
69 p_fw->update_input();
69 p_fw->update_input(wait_events);
70 70
71 71 auto update_time = jl::time::current(); auto update_time = jl::time::current();
72 72 elapsed_after_update = last_update_time.elapsed(update_time); elapsed_after_update = last_update_time.elapsed(update_time);
 
... ... namespace jen
96 96 bool is_drawn; bool is_drawn;
97 97 bool draw; bool draw;
98 98 bool break_loop; bool break_loop;
99 bool wait_events;
99 100 jl::rarray<const vk::Model> models; jl::rarray<const vk::Model> models;
100 101 }; };
101 102 } }
File src/framework.cpp changed (mode: 100644) (index 7661b36..2fd0512)
... ... bool call_key(bool *p_pressed, const Window &input, Foo foo, Args ... args) {
15 15 return false; return false;
16 16 } }
17 17
18 void jen::Framework::update_input()
18 void jen::Framework::update_input(bool wait_events)
19 19 { {
20 instance.window.poll();
20 if (wait_events)
21 instance.window.wait();
22 else
23 instance.window.poll();
21 24
22 25 if (not is_settings_buttons_enabled) if (not is_settings_buttons_enabled)
23 26 return; return;
 
... ... void jen::Framework::update_input()
73 76 auto &w = instance.window; auto &w = instance.window;
74 77 bool changed = false; bool changed = false;
75 78 call_key<Key::f1 >(is_f_pressed, w, dbg_toggle, &is_display_debug); call_key<Key::f1 >(is_f_pressed, w, dbg_toggle, &is_display_debug);
76 call_key<Key::f2 >(is_f_pressed, w, cursor_mode, &w);
77 changed |= call_key<Key::f3 >(is_f_pressed, w, depth_visible, &settings);
79 call_key<Key::f2 >(is_f_pressed, w, cursor_mode, &w);
80 changed |= call_key<Key::f3 >(is_f_pressed, w, depth_visible, &settings);
78 81 changed |= call_key<Key::f4 >(is_f_pressed, w, polygon_mode, &settings); changed |= call_key<Key::f4 >(is_f_pressed, w, polygon_mode, &settings);
79 82 changed |= call_key<Key::f5 >(is_f_pressed, w, cull_mode, &settings); changed |= call_key<Key::f5 >(is_f_pressed, w, cull_mode, &settings);
80 83 changed |= call_key<Key::f6 >(is_f_pressed, w, light_mode, &settings); changed |= call_key<Key::f6 >(is_f_pressed, w, light_mode, &settings);
 
... ... void jen::Framework::update_input()
83 86 changed |= call_key<Key::f9 >(is_f_pressed, w, wait_mode, &settings); changed |= call_key<Key::f9 >(is_f_pressed, w, wait_mode, &settings);
84 87 call_key<Key::f11>(is_f_pressed, w, monitor_mode, &w); call_key<Key::f11>(is_f_pressed, w, monitor_mode, &w);
85 88
86 if (changed)
89 if (changed)
87 90 void(graphics.apply_settings(settings)); void(graphics.apply_settings(settings));
88 91 } }
89 92
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/Jackalope/jen

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/Jackalope/jen

Clone this repository using git:
git clone git://git.rocketgit.com/user/Jackalope/jen

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main