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)
Update jrf-0.2.0 8720e50ca5f692a96ba764cab1a250683c6a0c59 Jackalope 2020-05-24 13:42:55
Update jlib-0.2.0 98c73665c12797a530d12e34dc764e72a8767ad1 Jackalope 2020-05-24 00:32:02
Mistake in CMake option 112275a2e0bc8619612ab49d808daeeeb599b8de Jackalope 2020-05-24 00:11:04
Device selection settings: 1. First suitable. 2. User can select with stdin/stdout. 3. User function callback. adcfd55f60dfc6eea019f083019012a0b4aa8f02 Jackalope 2020-05-23 13:52:07
ModuleGraphics: fix for mip level computation was wrong because depth is ignored. 834ceab8e0ea99b6b8c25928c9f3be968679cff3 Jackalope 2020-05-21 11:57:26
Compute module. Image copy staging buffer size limit problem fixed by representing row image memory in staging buffer. 740d8bf1d12352b08da05a63957afcb508ea6fd5 Jackalope 2020-05-21 11:55:31
Math new types update d0069637df7a0f74a9492a2a2a2d7a33102afde6 Jackalope 2020-05-21 11:51:46
Checking for blit support and fix typo in texture write f1adac801689ee3f7905d2582ac26948260bb352 Jackalope 2020-05-20 18:39:36
Added VkFormat properties checks and fallbacks to follow specification rules. 3c38bb0e9916aea31ef796a53a024aa3111e1ec7 Jackalope 2020-05-19 17:42:59
renamed compute::BindingsSet to BindingSet, vkw::BindNo to vkw::Binding, compute::BindingCreateInfo.bindingNo to binding 072430e257166208d6f4a7b759169779f21bf4c8 Jackalope 2020-05-18 17:51:25
better documentation 5233938573e5c557667de4f467209099a3d48faa Jackalope 2020-05-18 17:38:59
README improvements 3efd2a514affc8c6d706799fd56857c1a7c0d0f6 Jackalope 2020-05-18 17:35:48
better hash for white noise 55b1d39969b9a27a602c464ca216a89ec92cee0b Jackalope 2020-05-17 11:20:30
another reference to temporary removed 84231ce8c36619f9c696cb7da2879f504fa2e66c Jackalope 2020-05-17 10:46:26
removed git_sh directory 4fab20bc30f66ff96fdc9a336708cc5049c13ecb Jackalope 2020-05-17 04:13:34
README 9f70b0aba59a4eed15c5dc86423b0f7976734ce2 Jackalope 2020-05-17 04:09:18
removed C99 extension used in the nested structures initialization b5f33b0c562fd8cc872217eefde5fd6f58318ea3 Jackalope 2020-05-17 03:53:57
Make JEN modules as separate CMake targets e51ffd5b6cb8b1ba15e1f5df683feec8e0665240 Jackalope 2020-05-17 03:52:55
Automated shaders compilation with cmake, no more binaries in git efa9657336852c3543221bc56f4121f698f26044 Jackalope 2020-05-16 13:07:12
Compute process bug fix: correctly fences reset and removed reference to temporary c30b7bf737890cc3a23022c5c5470225bb324443 Jackalope 2020-05-16 07:00:15
Commit 8720e50ca5f692a96ba764cab1a250683c6a0c59 - Update jrf-0.2.0
Author: Jackalope
Author date (UTC): 2020-05-24 13:42
Committer name: Jackalope
Committer date (UTC): 2020-05-24 13:51
Parent(s): 98c73665c12797a530d12e34dc764e72a8767ad1
Signer:
Signing key:
Signing status: N
Tree: f5acff725dbfac366986e4505d05c8d2cbc99d23
File Lines added Lines deleted
libs/jlib 1 1
libs/jrf 1 1
src/CMakeLists.txt 1 1
src/compute/CMakeLists.txt 1 1
src/graphics/CMakeLists.txt 1 1
src/resource_manager/CMakeLists.txt 1 1
src/resource_manager/resource_manager.cpp 5 5
File libs/jlib changed (mode: 160000) (index 92bc2d9..a95b606)
1 Subproject commit 92bc2d91c14c58ce630a7f4f400b5d076ac03286
1 Subproject commit a95b60656c6c00d64efd769d5047853315964556
File libs/jrf changed (mode: 160000) (index a1152ff..9b39746)
1 Subproject commit a1152ffa6340863fbbd216a4d38806e2d31d3dd5
1 Subproject commit 9b39746de0abc22a2ae8d2ce8c2db253dd9ad71a
File src/CMakeLists.txt changed (mode: 100644) (index 4a502e5..5cc44a2)
... ... endif()
67 67
68 68
69 69 target_link_libraries(JEN target_link_libraries(JEN
70 PUBLIC ATLAS SIMDCPP JMATH VKW glfw JRF jlib ${Vulkan_LIBRARIES}
70 PUBLIC ATLAS SIMDCPP JMATH VKW glfw jlib jrf ${Vulkan_LIBRARIES}
71 71 PRIVATE -lpthread ${JEN_MODULES} PRIVATE -lpthread ${JEN_MODULES}
72 72 ) )
73 73 target_include_directories(JEN target_include_directories(JEN
File src/compute/CMakeLists.txt changed (mode: 100644) (index 612aaa3..eec309b)
... ... cmake_minimum_required(VERSION 3.5)
19 19 add_library(JEN_COMPUTE STATIC compute.cpp cmd_unit.cpp) add_library(JEN_COMPUTE STATIC compute.cpp cmd_unit.cpp)
20 20 target_link_libraries(JEN_COMPUTE target_link_libraries(JEN_COMPUTE
21 21 PUBLIC ${Vulkan_LIBRARIES} PUBLIC ${Vulkan_LIBRARIES}
22 PRIVATE VKW jlib JRF ATLAS JMATH
22 PRIVATE VKW jlib jrf ATLAS JMATH
23 23 ) )
24 24 target_include_directories(JEN_COMPUTE PRIVATE ${JEN_INCLUDE_DIR}) target_include_directories(JEN_COMPUTE PRIVATE ${JEN_INCLUDE_DIR})
25 25 target_compile_definitions(JEN_COMPUTE ${JEN_DEFINES}) target_compile_definitions(JEN_COMPUTE ${JEN_DEFINES})
File src/graphics/CMakeLists.txt changed (mode: 100644) (index ebfb226..2746a1f)
... ... add_library(JEN_GRAPHICS STATIC
44 44 ) )
45 45 target_link_libraries(JEN_GRAPHICS target_link_libraries(JEN_GRAPHICS
46 46 PUBLIC JMATH jlib ${Vulkan_LIBRARIES} PUBLIC JMATH jlib ${Vulkan_LIBRARIES}
47 PRIVATE JEN_MISC VKW glfw JRF pthread ATLAS ${FREETYPE_LIBRARIES}
47 PRIVATE JEN_MISC VKW glfw jrf pthread ATLAS ${FREETYPE_LIBRARIES}
48 48 ) )
49 49 target_include_directories(JEN_GRAPHICS target_include_directories(JEN_GRAPHICS
50 50 PRIVATE ${JEN_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE ${JEN_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
File src/resource_manager/CMakeLists.txt changed (mode: 100644) (index 24e11a3..f20ebed)
18 18 cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
19 19 add_library(JEN_RESOURCE_MANAGER STATIC resource_manager.cpp) add_library(JEN_RESOURCE_MANAGER STATIC resource_manager.cpp)
20 20 target_include_directories(JEN_RESOURCE_MANAGER PRIVATE ${JEN_INCLUDE_DIR}) target_include_directories(JEN_RESOURCE_MANAGER PRIVATE ${JEN_INCLUDE_DIR})
21 target_link_libraries(JEN_RESOURCE_MANAGER JEN_GRAPHICS VKW JRF)
21 target_link_libraries(JEN_RESOURCE_MANAGER JEN_GRAPHICS VKW jrf)
22 22 target_compile_definitions(JEN_RESOURCE_MANAGER ${JEN_DEFINES}) target_compile_definitions(JEN_RESOURCE_MANAGER ${JEN_DEFINES})
23 23
File src/resource_manager/resource_manager.cpp changed (mode: 100644) (index c0e7d1c..6cd03a9)
... ... print_indices(uint8_t* p_ind, uint64_t count, jrf::IndexFormat format)
119 119 [[nodiscard]] vkw::Result [[nodiscard]] vkw::Result
120 120 create_render(jen::ModuleGraphics mg, jrf::Vertices *p_jrf, jen::VertexData *p) create_render(jen::ModuleGraphics mg, jrf::Vertices *p_jrf, jen::VertexData *p)
121 121 { {
122 using JAT = jrf::Vertices::AttributeType;
122 using JAT = jrf::VertexAttribute;
123 123 p->offsets = {}; p->offsets = {};
124 124
125 125 auto set_off = [p_jrf, p] auto set_off = [p_jrf, p]
126 (jrf::Vertices::Format f, uint8_t d_count, JAT jat, jen::VAttr rat) -> bool
126 (jrf::VertexFormat f, uint8_t d_count, JAT jat, jen::VAttr rat) -> bool
127 127 { {
128 128 auto &attr = p_jrf->attributes; auto &attr = p_jrf->attributes;
129 129 { {
 
... ... create_render(jen::ModuleGraphics mg, jrf::Vertices *p_jrf, jen::VertexData *p)
142 142 } }
143 143 return true; return true;
144 144 }; };
145 using Format = jrf::Vertices::Format;
145 using Format = jrf::VertexFormat;
146 146 if ( not set_off(Format::F32, 3, JAT::POSITION, jen::VAttr::POSITION ) if ( not set_off(Format::F32, 3, JAT::POSITION, jen::VAttr::POSITION )
147 147 or not set_off(Format::F32, 3, JAT::NORMAL, jen::VAttr::NORMAL ) or not set_off(Format::F32, 3, JAT::NORMAL, jen::VAttr::NORMAL )
148 148 or not set_off(Format::F32, 2, JAT::TEX_COORD, jen::VAttr::TEX_COORD)) or not set_off(Format::F32, 2, JAT::TEX_COORD, jen::VAttr::TEX_COORD))
 
... ... create_scene(const jl::string_ro &path, uint32_t shift_scale, SceneData *p_dst)
633 633 memcpy(&ed.world.transform, &e.options.transform, memcpy(&ed.world.transform, &e.options.transform,
634 634 sizeof(jen::ModelWorld::transform)); sizeof(jen::ModelWorld::transform));
635 635 static_assert(sizeof(jen::ModelWorld::transform) - static_assert(sizeof(jen::ModelWorld::transform) -
636 sizeof(jrf::SceneEntry::Options::transform) == 0,
636 sizeof(jrf::SceneEntryOptions::transform) == 0,
637 637 "checking memcpy"); "checking memcpy");
638 638
639 639 memcpy(&ed.world.position, &e.options.pos, memcpy(&ed.world.position, &e.options.pos,
640 640 sizeof(jen::ModelWorld::position)); sizeof(jen::ModelWorld::position));
641 641 static_assert(sizeof(jen::ModelWorld::position) - static_assert(sizeof(jen::ModelWorld::position) -
642 sizeof(jrf::SceneEntry::Options::pos) == 0,
642 sizeof(jrf::SceneEntryOptions::pos) == 0,
643 643 "checking memcpy"); "checking memcpy");
644 644
645 645 for (unsigned int c = 0; c < 3; ++c) for (unsigned int c = 0; c < 3; ++c)
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