Skip to content

Commit

Permalink
Merge branch 'Dimrok-enhancement/sanitizing'
Browse files Browse the repository at this point in the history
  • Loading branch information
pumexx committed Aug 9, 2018
2 parents c488d64 + 78262d5 commit 0d1fbed
Show file tree
Hide file tree
Showing 170 changed files with 575 additions and 584 deletions.
84 changes: 42 additions & 42 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ configure_file (
include( pumex_macros )
include( pumex_externals )

set( PUMEXLIB_SHADER_NAMES
set( PUMEXLIB_SHADER_NAMES
shaders/text_draw.vert
shaders/text_draw.geom
shaders/text_draw.frag
Expand All @@ -50,7 +50,7 @@ add_custom_target ( pumexlib-shaders DEPENDS ${PUMEXLIB_OUTPUT_SHADERS} SOURCES
add_custom_command(TARGET pumexlib-shaders PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/shaders")

set( PUMEXLIB_HEADERS )
list( APPEND PUMEXLIB_HEADERS
list( APPEND PUMEXLIB_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Asset.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/AssetBuffer.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/AssetBufferNode.h
Expand Down Expand Up @@ -81,7 +81,7 @@ list( APPEND PUMEXLIB_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Node.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/NodeVisitor.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/PerObjectData.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/PhysicalDevice.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/PhysicalDevice.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Pipeline.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Pumex.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Query.h
Expand All @@ -106,22 +106,22 @@ list( APPEND PUMEXLIB_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/Buffer.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/HashCombine.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/Log.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/Shapes.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/Shapes.h
${CMAKE_CURRENT_BINARY_DIR}/include/pumex/Version.h
)
if(WIN32)
list( APPEND PUMEXLIB_HEADERS
list( APPEND PUMEXLIB_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/platform/win32/HPClockWin32.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/platform/win32/WindowWin32.h
)
elseif(UNIX AND NOT APPLE)
list( APPEND PUMEXLIB_HEADERS
list( APPEND PUMEXLIB_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/platform/linux/WindowXcb.h
)
endif()

set( PUMEXLIB_SOURCES )
list( APPEND PUMEXLIB_SOURCES
list( APPEND PUMEXLIB_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Asset.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/AssetBuffer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/AssetBufferNode.cpp
Expand Down Expand Up @@ -186,23 +186,23 @@ elseif(UNIX AND NOT APPLE)
endif()

add_library( pumexlib SHARED "" )
target_sources( pumexlib
PUBLIC
$<BUILD_INTERFACE:${PUMEXLIB_HEADERS}>
PRIVATE
${PUMEXLIB_SOURCES}
target_sources( pumexlib
PUBLIC
$<BUILD_INTERFACE:${PUMEXLIB_HEADERS}>
PRIVATE
${PUMEXLIB_SOURCES}
)
target_include_directories( pumexlib
PUBLIC
$<BUILD_INTERFACE:${PUMEXLIB_PUBLIC_INCLUDES}>
target_include_directories( pumexlib
PUBLIC
$<BUILD_INTERFACE:${PUMEXLIB_PUBLIC_INCLUDES}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE
$<BUILD_INTERFACE:${PUMEXLIB_PRIVATE_INCLUDES}>
PRIVATE
$<BUILD_INTERFACE:${PUMEXLIB_PRIVATE_INCLUDES}>
)
target_compile_definitions( pumexlib
PUBLIC
NOMINMAX GLM_ENABLE_EXPERIMENTAL GLM_FORCE_RADIANS GLM_FORCE_DEPTH_ZERO_TO_ONE
target_compile_definitions( pumexlib
PUBLIC
NOMINMAX GLM_ENABLE_EXPERIMENTAL GLM_FORCE_RADIANS GLM_FORCE_DEPTH_ZERO_TO_ONE
PRIVATE
PUMEX_EXPORTS
)
Expand Down Expand Up @@ -240,7 +240,7 @@ install( EXPORT PumexTargets
NAMESPACE pumex::
DESTINATION lib/cmake/pumex
COMPONENT cmake_files
)
)

include( CMakePackageConfigHelpers )
write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/pumex-config-version.cmake
Expand All @@ -267,37 +267,37 @@ cpack_add_install_type( Developer DISPLAY_NAME "Development files WITHOUT exampl
cpack_add_component_group( DevGroup DISPLAY_NAME "Development files" DESCRIPTION "All files required to develop your applications using Pumex library" )
cpack_add_component_group( ExampleApps DISPLAY_NAME "Example applications" DESCRIPTION "Example applications show Pumex library in action" )

cpack_add_component( dependencies
DISPLAY_NAME "3rd party libraries"
DESCRIPTION "Libraries that must be installed in order to run Pumex library"
GROUP DevGroup
cpack_add_component( dependencies
DISPLAY_NAME "3rd party libraries"
DESCRIPTION "Libraries that must be installed in order to run Pumex library"
GROUP DevGroup
INSTALL_TYPES Developer Full
)
)
cpack_add_component( libraries
DISPLAY_NAME "Library files"
DESCRIPTION "Dynamic libraries used to build applications with Pumex library. Libraries are also used by example applications"
GROUP DevGroup
DISPLAY_NAME "Library files"
DESCRIPTION "Dynamic libraries used to build applications with Pumex library. Libraries are also used by example applications"
GROUP DevGroup
INSTALL_TYPES Developer Full
DEPENDS dependencies
)
)
cpack_add_component( headers
DISPLAY_NAME "Header files"
DESCRIPTION "Header files required to write and build applications with Pumex library"
GROUP DevGroup
DISPLAY_NAME "Header files"
DESCRIPTION "Header files required to write and build applications with Pumex library"
GROUP DevGroup
INSTALL_TYPES Developer Full
DEPENDS libraries
)
)
cpack_add_component( cmake_files
DISPLAY_NAME "CMake configuration files"
DESCRIPTION "Files that help find Pumex library and use it in your application"
GROUP DevGroup
DISPLAY_NAME "CMake configuration files"
DESCRIPTION "Files that help find Pumex library and use it in your application"
GROUP DevGroup
INSTALL_TYPES Developer Full
DEPENDS libraries
)
)
cpack_add_component( examples
DISPLAY_NAME "Example applications"
DESCRIPTION "Example applications show Pumex library in action"
GROUP ExampleApps
DISPLAY_NAME "Example applications"
DESCRIPTION "Example applications show Pumex library in action"
GROUP ExampleApps
INSTALL_TYPES Full
DEPENDS libraries
)
)
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ You can follow library development [on Twitter](https://twitter.com/pumex_lib) .

Every Pumex application consists of three distinct layers of objects :

- first layer is responsible for creation and configuration of Vulkan instance, logical devices, surfaces and windows. Let's call it a **device layer**. Below you may see an example of such layer.
- first layer is responsible for creation and configuration of Vulkan instance, logical devices, surfaces and windows. Let's call it a **device layer**. Below you may see an example of such layer.




![viewer/device/surface layer](doc/images/DeviceLayer.png)


- second layer is called a **render workflow** ( also known in literature as frame graph, or render graph ). Each Vulkan surface rendered by the application may use its own render workflow, but typically the workflow is shared between surfaces ( see: image above ).
- second layer is called a **render workflow** ( also known in literature as frame graph, or render graph ). Each Vulkan surface rendered by the application may use its own render workflow, but typically the workflow is shared between surfaces ( see: image above ).

Render workflow defines render operations and inputs/outputs between them. During application run abstract workflow is compiled into a set of Vulkan objects required to render a scene: graphics passes and subpasses ( with its attachments and dependencies ), compute passes, images, buffers, attachments and pipeline barriers. These objects are then used to build a primary command buffer.

Expand Down Expand Up @@ -110,15 +110,15 @@ While each example is running , you are able to use following inputs :

- **F7**, **F8** - show less / more frames in "CPU stats" mode



### pumexcrowd

Application that renders a crowd of 500 animated people on one or more windows.

Application presents :
Application presents :

- how to utilize **compute operation** in a render worklow.
- how to utilize **compute operation** in a render worklow.
- how to use output storage buffer from compute operation as input indirect buffer in a following render operation

- how to use instanced rendering nodes like **pumex::AssetBufferFilterNode** and **pumex::AssetBuffer**
Expand Down Expand Up @@ -148,9 +148,9 @@ Below is additional image showing pumexcrowd example working in VR mode ( 2 wind

### pumexgpucull

Application that renders simple not textured static objects ( trees, buildings ) and dynamic objects ( cars, airplanes, blimps ) on one or more windows.
Application that renders simple not textured static objects ( trees, buildings ) and dynamic objects ( cars, airplanes, blimps ) on one or more windows.

This application serves as performance test, because all main parameters may be modified ( LOD ranges, number of objects, triangle count on each mesh ). All meshes are generated procedurally. Each LOD for each mesh has different color, so you may see, when switches betwen LODs occur.
This application serves as performance test, because all main parameters may be modified ( LOD ranges, number of objects, triangle count on each mesh ). All meshes are generated procedurally. Each LOD for each mesh has different color, so you may see, when switches betwen LODs occur.

In OpeneSceneGraph library there is almost the same application called osggpucull, so you may compare performance of Vulkan API and OpenGL API.

Expand All @@ -173,18 +173,18 @@ Command line parameters enable us to use one of predefined window configurations
--triangle-modifier=[triangle-modifier]
instance triangle quantity [%]
--instances-per-cell=[instances-per-cell]
how many static instances per cell
how many static instances per cell
```

### pumexdeferred

Application that makes deferred rendering with multisampling in one window. The number of samples per pixel may be configured from command line ( see parameters below ). Available values of samples per pixel include : 1, 2, 4, 8.
Application that makes deferred rendering with multisampling in one window. The number of samples per pixel may be configured from command line ( see parameters below ). Available values of samples per pixel include : 1, 2, 4, 8.

By default application uses depth prepass rendering, but you are able to switch it off using command line parameters ( see below ).

Application presents how to use attachment produced by one render operation as input attachment in following render operation.

Famous Sponza Palace model is used as a render scene.
Famous Sponza Palace model is used as a render scene.

Shaders used in that example realize **physically based rendering** inspired by [learnopengl.com](https://learnopengl.com/#!PBR/Theory)

Expand Down Expand Up @@ -336,11 +336,11 @@ Steps required to build and install library :

1. download Pumex Library from [here](https://github.com/pumexx/pumex)

2. create solution files for gcc using **CMake**, choose "Release" configuration type for maximum performance
2. create solution files for gcc using **CMake**, choose "Release" configuration type for maximum performance

3. perform **make -j4**

4. *( optional step )* perform **sudo make install** if necessary.
4. *( optional step )* perform **sudo make install** if necessary.
Pumex library instals itself in /usr/local/* directories. On some Linux distributions ( Ubuntu for example ) /usr/local/lib directory is not added to LD_LIBRARY_PATH environment variable. In that case you will see a following error while trying to run one of the example programs :

```
Expand Down Expand Up @@ -393,8 +393,8 @@ On Windows all dependencies are downloaded and built on first Pumex library buil
- architecture of a render workflow still needs some improvements
- scene graphs should only render what is visible ( that's why pumexgpucull example is slower than osggpucull example now ). Should it be mandatory or optional ?
- more texture loaders ( at the moment only dds and ktx texture files are available )
- asynchronous loading of models and textures
- new examples presenting things like :
- asynchronous loading of models and textures
- new examples presenting things like :
- different types of shadows
- order independent transparency ( compute shaders using render pass attachments as input storage images )
- physics engine integration
Expand Down

0 comments on commit 0d1fbed

Please sign in to comment.