Skip to content
Snippets Groups Projects
Commit e866d3fd authored by Mathias Paulin's avatar Mathias Paulin :speech_balloon:
Browse files

Doc and CI

parent 622ed100
Branches
No related tags found
No related merge requests found
---
BasedOnStyle: LLVM
Language: Cpp
Standard: Cpp11
AllowShortFunctionsOnASingleLine: Inline
AllowShortBlocksOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
AlwaysBreakTemplateDeclarations: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
ColumnLimit: 100
IndentWidth: 4
TabWidth: 4
UseTab: Never
NamespaceIndentation: None
IndentPPDirectives: 'AfterHash'
AlignEscapedNewlines: 'Left'
Cpp11BracedListStyle: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true
BreakConstructorInitializers: AfterColon
SortUsingDeclarations: true
PointerAlignment: Left
SpacesInParentheses: true
AlignTrailingComments: true
AlignConsecutiveAssignments: true
AllowAllParametersOfDeclarationOnNextLine: false
BinPackArguments: false
BinPackParameters: false
#not supported yet ?
#SpaceBeforeCpp11BracedList: true
...
.idea
cmake-build*
/bin/
# Simple image with CMake, make, git and g++
# TODO : find how to create my own image for gitlabci
image: stormirit/radium_dev:v0.x
stages:
- prepare
- build
# - tests
- deploy
# uncomment the following when packaging will be validated
# - package
# will improve the compilation time drastically
cache:
untracked: true
paths:
- Radium-Engine
- build
# Since we are using cache to persist all data, we need to clean in the first
# step.
prepare:
stage: prepare
script:
- "[[ -d Radium-Engine ]] || git clone --recurse-submodules https://github.com/MathiasPaulin/Radium-Engine.git"
- cd Radium-Engine
- git checkout toward-v2
- "[[ -d build-radium ]] || mkdir build-radium"
- cd build-radium
# until new build chain is available, must compile everything.
- cmake -DCMAKE_BUILD_TYPE=Release ..
# - cmake -DRADIUM_ASSIMP_SUPPORT=OFF
- make -j 2 radiumCore radiumEngine radiumIO radiumPluginBase radiumGuiBase
- cd ../..
- git reset --hard HEAD
- git clean -d -f -x
build:
stage: build
script:
- export ROOT_DIR=`pwd`
- "[[ -d build ]] || mkdir build"
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MODULE_PATH="$ROOT_DIR/Radium-Engine/cmake/" -DCMAKE_PREFIX_PATH="$ROOT_DIR" ..
- make -j 2
# - make install
#test:
# stage: tests
# script:
# - export ROOT_DIR=`pwd`
# - "[[ -d build ]] || mkdir build"
# - cd build
# - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MODULE_PATH="$ROOT_DIR/Radium-Engine/cmake/" -DCMAKE_PREFIX_PATH="$ROOT_DIR" ..
# - make tests
#package:
# stage: package
# artifacts:
# expire_in: 1 week
# paths:
# - build/out/
# script:
# - cd build
# - make package
# see doc at https://gitlab.com/help/user/project/pages/introduction.md
pages:
stage: deploy
script:
- apt-get update && apt-get install -y --no-install-recommends doxygen graphviz
- export ROOT_DIR=`pwd`
- "[[ -d build ]] || mkdir build"
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MODULE_PATH="$ROOT_DIR/Radium-Engine/cmake/" -DCMAKE_PREFIX_PATH="$ROOT_DIR" ..
- make doc
- mv doc/doc ../public
artifacts:
paths:
- public
only: # Only generate doc on main repo's master branch
- master
cmake_minimum_required(VERSION 3.0)
# Rendering project
project( Radium-RenderApp )
cmake_minimum_required( VERSION 2.8.11 )
project(Radium-RenderApp VERSION 0.0.1)
set(VERSION_TYPE " alpha" CACHE STRING "version type" FORCE)
site_name(VERSION_HOST) # read hostname to VERSION_HOST
set(VERSION_HOST "${VERSION_HOST}" CACHE STRING "host of build" FORCE)
if (APPLE)
cmake_policy(SET CMP0042 NEW)
endif(APPLE)
if ( NOT CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE Release )
set( CMAKE_BUILD_TYPE Release )
endif()
# Radium Stuff
......@@ -21,6 +26,26 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
# Win32 stuff
if (MSVC OR MSVC_IDE)
# Copy libs / targets in the correct directories
if ("${CMAKE_GENERATOR}" STREQUAL "NMake Makefiles")
set(PDB_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
else ()
foreach (OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
endforeach (OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
endif ()
endif (MSVC OR MSVC_IDE)
# Specific compile options
add_compile_options(-Wno-deprecated-copy)
set(APPLICATION_NAME renderApp)
# Add application source code
add_subdirectory( src )
# Add documentation directory
add_subdirectory(doc)
# Radium-RenderingApp
Experimental rendering application build over Radium libraries. Used as a sandbox for Radium V2 rendering capabilities.
\ No newline at end of file
Experimental rendering application build over Radium libraries.
Used as a sandbox for Radium V2 rendering capabilities.
# Specification of the _Appearance Interface_ of Radium shaders
Being able to compose shaders in a specific renderer while taking profit of Radium Material Library
(either included in the base engine or defined in plugins) require a clean definition of appearance computation
process and the definition of a glsl interface.
This proposal aims to construct such an interface and to discuss about its usability
## Appearance computation needs
In order to compute the appearance of an object, and according to the GLSL way of life for rendering, several
aspects must be taken into account.
1. Accessing or computing appearance attributes that depends on geometric data, such as
- vertex attribs (normal, position, color, ...)
2. Accessing or computing appearance attributes that depends on extension of geometric data, such as
- Normal maps
- Displacement maps
- Transparency maps
3. Accessing and computing appearance attributes that depends on the BSDF model used to render the object, such as
- Blinn-Phong BSDF (default BSDF in Radium Engine)
- Microfacet - based BSDF (added by plugins such as GLTF-2 or PBRT)
Due to our current understanding of the OpenGL Shader ecosystem, we propose to define a general
interface for all of these 3 cases such that one can implement these in .glsl files that will be included
into Pipeline program by the renderer or the application.
## Interface proposal
As glsl allows predeclaration of functions, we are able to define the main interfaces even
if one could find dependencies between them when implementing a particular instance. one exemple of suche dependencies
is the Blinn-Phong BSDF that could take parameters either from the "Material" object in Radium or from color attributes
of a vertex.
### BSDF interface
*TBD*
### Microgeometry interface
*TBD*
### Vertex attrib interface
*TBD*
# This CMake file will add doc target for convenient documentation generation.
#
# Additional features are supported:
# * dot = for automatically generated UML diagrams (class, include, caller, call, collaboration)
# * PlantUML = for easy generation of custom diagrams
# Helper functions
macro(path_linux_to_win MsysPath ResultingPath)
string(REGEX REPLACE "^/([a-zA-Z])/" "\\1:/" ${ResultingPath} "${MsysPath}")
endmacro()
macro(path_win_to_linux MsysPath ResultingPath)
string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" ${ResultingPath} "${MsysPath}")
endmacro()
# enable if doxygen found
find_package(Doxygen 1.8.0)
message(STATUS "Can build doc? ${DOXYGEN_FOUND}")
if (DOXYGEN_FOUND)
# Search for plantUML for creating UML diagrams from doxygen
find_program(PLANT_UML_PATH plantuml.jar PATH_SUFFIXES PlantUML plantuml Plantuml
PATHS /usr/share /usr/local/share/ /usr/local/bin /opt/local/share/java/ c/Program\ Files*)
if (NOT PLANT_UML_PATH)
message(WARNING "Looking for PlantUML - not found, some UML diagrams will not be generated via doxygen.")
else ()
message(STATUS " + PlantUML - for custom UML YES ")
endif ()
#Search for DOT for autogenerated UML diagrams from doxygen
find_program(DOT_PATH dot PATH_SUFFIXES graphviz2.38/bin graphviz/bin)
if (NOT DOT_PATH)
message(WARNING "Looking for DOT (Graphviz) - not found, some UML diagrams will not be generated via doxygen.")
else ()
message(STATUS " + Graphviz/Dot - for generated graphs YES ")
endif ()
path_win_to_linux(${CMAKE_CURRENT_SOURCE_DIR} CMAKE_CURRENT_SOURCE_DIR_LINUX)
path_win_to_linux(${PROJECT_SOURCE_DIR} PROJECT_SOURCE_DIR_LINUX)
path_win_to_linux(${DOT_PATH} DOT_PATH_LINUX)
path_win_to_linux(${PLANT_UML_PATH} PLANT_UML_PATH_LINUX)
path_win_to_linux(${CMAKE_CURRENT_BINARY_DIR} CMAKE_CURRENT_BINARY_DIR_LINUX)
# configure doxygen configuration file
set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile.in)
set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${doxyfile_in} ${doxyfile} @ONLY)
# doc build only target, target is not in default build, so it must be
# triggered explicitly
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM)
# Where docs will be installed.
# Note: if docs shall be not a part of final release, leave this commented out
# docs will be only available in [build_dir]/doc/doc/index.html
# install(
# DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/
# DESTINATION share/doc/${PROJECT_NAME}
# OPTIONAL)
endif ()
# Use: `doxygen -g test.txt` to generate all possible settings for this file
# For modern doxygen style uncomment these three lines:
HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/doxygen/customdoxygen.css
HTML_HEADER = @CMAKE_CURRENT_SOURCE_DIR@/doxygen/header.html
HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/doxygen/footer.html
# not interested build output
QUIET = NO
# Basic settings:
PROJECT_NAME = "@CMAKE_PROJECT_NAME@"
PROJECT_NUMBER = @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@@VERSION_TYPE@
STRIP_FROM_PATH = @CMAKE_CURRENT_SOURCE_DIR_LINUX@ \
@PROJECT_SOURCE_DIR_LINUX@
INPUT = @PROJECT_SOURCE_DIR_LINUX@/README.md \
@CMAKE_CURRENT_SOURCE_DIR_LINUX@ \
@PROJECT_SOURCE_DIR_LINUX@/doc\
@PROJECT_SOURCE_DIR_LINUX@/src
FILE_PATTERNS = *.h \
*.hpp \
*.hh \
*.inl \
*.c \
*.cc \
*.cpp.in \
*.cpp \
*.md
RECURSIVE = YES
USE_MDFILE_AS_MAINPAGE = "@PROJECT_SOURCE_DIR_LINUX@/README.md"
# output location
HTML_OUTPUT = "@CMAKE_CURRENT_BINARY_DIR_LINUX@/doc"
IMAGE_PATH = "@CMAKE_CURRENT_SOURCE_DIR_LINUX@"
# We want to create nice UML graphs
PLANTUML_JAR_PATH = "@PLANT_UML_PATH_LINUX@"
DOT_PATH = "@DOT_PATH_LINUX@"
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
# Ukrainian and Vietnamese.
# The default value is: English.
OUTPUT_LANGUAGE = English
# Color style
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 40
HTML_COLORSTYLE_GAMMA = 80
# max size 200x55px
PROJECT_LOGO =
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
# function all documented functions referencing it will be listed.
# The default value is: NO.
REFERENCED_BY_RELATION = YES
# If the REFERENCES_RELATION tag is set to YES then for each documented function
# all documented entities called/used by that function will be listed.
# The default value is: NO.
REFERENCES_RELATION = YES
# This is nice to have - callgraphs of functions
HAVE_DOT = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
GENERATE_LEGEND = YES
INCLUDED_BY_GRAPH = YES
INCLUDE_GRAPH = YES
DOT_IMAGE_FORMAT = svg
INTERACTIVE_SVG = YES
# More insight to templates, generaly not needed
TEMPLATE_RELATIONS = NO
# in class diagrams, you will have members and such
# Also they will be bigger
UML_LOOK = YES
UML_LIMIT_NUM_FIELDS = 6
# should all pictures be collapsed?
HTML_DYNAMIC_SECTIONS = NO
# use with: /// @todo Do more stuff.
GENERATE_TODOLIST = YES
# we want all we can get
EXTRACT_ALL = YES
EXTRACT_STATIC = YES
EXTRACT_PRIVATE = YES
# We do not need latex output
GENERATE_LATEX = NO
USE_PDFLATEX = NO
# this makes first sentence from comment block a brief description.
# It is VERY useful
JAVADOC_AUTOBRIEF = YES
# Why not...
BUILTIN_STL_SUPPORT = YES
# Do we want source code browser? YES! Do we want strip comments? NO
SOURCE_BROWSER = YES
STRIP_CODE_COMMENTS = NO
# Side panel
# If you enable this, change .container max-width: 960px; to 1240px
GENERATE_TREEVIEW = YES
/* The standard CSS for doxygen
modified by RossCairns.com https://bitbucket.org/rc1/doxygen-style/wiki/Home,
then modified by kracejic https://github.com/kracejic/cleanCppProject.
Headers/top: #42657B
Link #366495
Text color: #3E3E3E
Background: white
Code-background #f5f5f5
Gray-borders #CCCCCC
Code #826542
*/
.container {
margin: 0 auto;
max-width: 1000px;
background-color: white;
}
body, table, div, p, dl {
font-family: sans-serif;
font: 400 14px/22px sans-serif;
}
p, div, dl {
color: #3E3E3E;
}
dl {
margin-top: 0px;
margin-bottom: 0px;
}
div.contents p {
font-family: sans-serif;
margin-top: 0.0em;
margin-bottom: 0.2em;
}
/* @group Heading Levels */
h1, h1.groupheader {
margin-top: 10px;
margin-bottom: 0px;
font-size: 22px;
color: #42657B;
padding: 0px 0px 20px 0px;
}
h2, h2.groupheader {
padding-top: 10px;
font-size: 17px;
color: #42657B;
font-family: sans-serif;
}
h3, h3.groupheader {
font-size: 15px;
color: #42657B;
font-family: sans-serif;
}
h4, h4.groupheader {
font-size: 14px;
color: #42657B;
font-family: sans-serif;
}
/* class help */
h2.groupheader {
border-bottom: 1px solid #CCCCCC;
}
dt {
font-weight: bold;
}
div.multicol {
-moz-column-gap: 1em;
-webkit-column-gap: 1em;
-moz-column-count: 3;
-webkit-column-count: 3;
}
p.startli, p.startdd, p.starttd {
margin-top: 2px;
}
p.endli {
margin-bottom: 0px;
}
p.enddd {
margin-bottom: 4px;
}
p.endtd {
margin-bottom: 2px;
}
/* @end */
caption {
font-weight: bold;
}
span.legend {
font-size: 70%;
text-align: center;
}
h3.version {
font-size: 90%;
padding-bottom: 10px;
}
div#main-nav li, div#navrow1 li {
border: none;
}
div#main-nav li a:hover,
div#main-nav li.current,
div#navrow1 li a:hover, div#navrow1 li.current,
div#navrow2 li a:hover, div#navrow2 li.current,
div#navrow3 li a:hover, div#navrow3 li.current,
div#navrow4 li a:hover, div#navrow4 li.current {
border: none;
background-color: #384F5D;
}
div#main-nav ul, div#main-nav a, div#main-nav a:hover,
div#nav-path.navpath ul, #nav-path a,
div#navrow1 a, div#navrow1, div#navrow1 li,
div#navrow2 a, div#navrow2, div#navrow2 li,
div#navrow3 a, div#navrow3, div#navrow3 li,
div#navrow4 a, div#navrow4, div#navrow4 li {
background-image: none;
color: white;
text-shadow: none;
}
div#navrow1.tabs,
div#navrow2.tabs2,
div#navrow3.tabs2,
div#navrow4.tabs3 {
border-bottom: 1px solid #CCCCCC;
}
.navpath li {
background-image: none;
border-right: 1px solid white;
border-radius: 1.4em;
}
#side-nav #nav-sync {
top: 0px;
right: 8px;
}
div#top, div#projectname, div#main-nav ul, div#main-nav li a {
background-color: #42657B;
color: white;
}
.sm-dox a span.sub-arrow {
background-color: transparent;
color: white;
border-color: white transparent transparent transparent;
}
.sm-dox ul a span.sub-arrow {
background-color: transparent;
color: white;
border-color: transparent transparent transparent white;
}
.ui-resizable-e {
background-image: none;
background-color: #f5f5f5;
width: 4px;
}
div#nav-tree, #nav-tree .label {
background-image: none;
background-color: #f5f5f5;
font-size: 14px;
font-family: sans-serif;
}
div#side-nav {
position: relative;
float: left;
margin: 0px;
width: 200px;
padding: 0px;
clear: none;
}
#nav-tree .selected, #nav-tree .selected a {
text-shadow: none;
background-image: none;
color: #3E3E3E;
font-weight: bold;
}
div.qindex, div.navtab {
background-color: #e8eef2;
border: 1px solid #84b0c7;
text-align: center;
margin: 2px;
padding: 2px;
}
div.qindex, div.navpath {
width: 100%;
line-height: 140%;
}
div.navtab {
margin-right: 15px;
}
#titlearea {
border-bottom: 1px solid white;
padding-left: 6px;
}
/* @group Link Styling */
a {
color: #366495;
font-weight: normal;
text-decoration: none;
}
.contents a:visited {
color: #366495;
}
a:hover {
text-decoration: underline;
}
a.qindex {
font-weight: bold;
}
a.qindexHL {
font-weight: bold;
background-color: #366495;
color: #ffffff;
border: 1px double #CCCCCC;
}
.contents a.qindexHL:visited {
color: #ffffff;
}
a.el {
font-weight: normal;
}
a.elRef {
}
a.code {
color: #366495;
}
a.codeRef {
color: #366495;
}
/* @end */
dl.el {
margin-left: -1cm;
}
.fragment {
font-family: monospace, fixed;
padding: 0.8rem 0.8rem;
margin: 0.5rem 2px 0.5rem 2px;
background-color: #f5f5f5;
border: none;
}
pre.fragment, div.fragment {
border: 1px solid #CCCCCC;
background-color: #f5f5f5;
padding: 8px 8px;
margin: 8px 8px 8px 2px;
overflow: auto;
word-wrap: break-word;
line-height: 125%;
}
div.ah {
background-color: black;
font-weight: bold;
color: white;
margin-bottom: 3px;
margin-top: 3px
}
div.headertitle {
margin-top: 1em;
margin-left: 12px;
padding: 0px;
}
div.groupHeader, div.title, div.header {
margin-left: 0;
margin-top: 0;
margin-bottom: 0;
padding: 0px;
color: #42657B;
font-weight: bold;
font-size: 24px;
font-family: sans-serif;
background-image: none;
background-color: white;
text-shadow: none;
border-bottom: 1px;
}
div.groupText {
margin-left: 16px;
font-style: italic;
}
body {
background: white;
color: black;
}
td.indexkey {
background-color: #F1F5F9;
font-weight: bold;
border: 1px solid #CCCCCC;
margin: 2px 0px 2px 0;
padding: 2px 10px;
}
td.indexvalue {
background-color: #F1F5F9;
border: 1px solid #CCCCCC;
padding: 2px 10px;
margin: 2px 0px;
}
tr.memlist {
background-color: #f0f0f0;
}
p.formulaDsp {
text-align: center;
}
img.formulaDsp {
}
img.formulaInl {
vertical-align: middle;
}
div.center {
text-align: center;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
}
div.center img {
border: 0px;
}
img.footer {
border: 0px;
vertical-align: middle;
}
code {
color: #826542;
}
/* @group Code Colorization */
span.keyword {
color: #008000
}
span.keywordtype {
color: #604020
}
span.keywordflow {
color: #e08000
}
span.comment {
color: #800000
}
span.preprocessor {
color: #806020
}
span.stringliteral {
color: #002080
}
span.charliteral {
color: #008080
}
span.vhdldigit {
color: #ff00ff
}
span.vhdlchar {
color: #000000
}
span.vhdlkeyword {
color: #700070
}
span.vhdllogic {
color: #ff0000
}
/* @end */
.search {
color: #003399;
font-weight: bold;
}
form.search {
margin-bottom: 0px;
margin-top: 0px;
}
input.search {
font-size: 75%;
color: #000080;
font-weight: normal;
background-color: #F1F5F9;
}
#MSearchBox {
position: relative;
text-align: right;
float: right;
widows: 100%;
}
td.tiny {
font-size: 75%;
}
.dirtab {
padding: 4px;
border-collapse: collapse;
border: 1px solid #84b0c7;
}
th.dirtab {
background: #F1F5F9;
font-weight: bold;
}
hr {
height: 0;
}
div .plantumlgraph {
text-align: left;
transform: scale(0.85) translateX(-10%);
}
/* @group Member Descriptions */
.mdescLeft, .mdescRight,
.memItemLeft, .memItemRight,
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
background-color: #FAFAFA;
border: none;
margin: 4px;
padding: 1px 0 0 8px;
}
.mdescLeft, .mdescRight {
padding: 0px 8px 4px 8px;
color: #555;
}
.memItemLeft, .memItemRight, .memTemplParams {
border-top: 1px solid #ccc;
background-color: #F9F9F9;
}
.memItemLeft, .memTemplItemLeft {
white-space: nowrap;
}
.memTemplParams {
color: #606060;
white-space: nowrap;
}
/* @end */
/* @group Member Details */
/* Styles for detailed member documentation */
.memtitle {
display: none;
}
.memtemplate {
font-size: 80%;
color: #606060;
font-weight: normal;
margin-left: 3px;
}
.memnav {
background-color: #F1F5F9;
border: 1px solid #84b0c7;
text-align: center;
margin: 2px;
margin-right: 15px;
padding: 2px;
}
.memitem {
padding: 0;
margin-bottom: 40px;
}
.memname {
white-space: nowrap;
font-weight: bold;
font-size: 16px;
color: #42657B;
margin-left: 0px;
border-collapse: collapse;
}
.memname td {
padding: 0.0em 0px 0.5em 0px;
}
.memproto, .memdoc {
border: none;
}
.memproto {
padding: 0;
background-color: white;
background-image: none;
font-weight: bold;
-webkit-box-shadow: none;
-moz-box-shadow: none;
text-shadow: none;
}
.memdoc {
padding: 0px;
background-color: #FFFFFF;
background-image: none;
border-top-width: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
}
.paramkey {
text-align: right;
}
.paramtype {
white-space: nowrap;
}
.paramname {
color: #885656;
white-space: nowrap;
}
.paramname em {
font-style: normal;
}
/* @end */
/* @group Directory (tree) */
/* for the tree view */
.ftvtree {
font-family: sans-serif;
margin: 0.5em;
}
/* these are for tree view when used as main index */
.directory {
font-size: 9pt;
font-weight: bold;
}
.directory h3 {
margin: 0px;
margin-top: 1em;
font-size: 11pt;
}
/*
The following two styles can be used to replace the root node title
with an image of your choice. Simply uncomment the next two styles,
specify the name of your image and be sure to set 'height' to the
proper pixel height of your image.
*/
/*
.directory h3.swap {
height: 61px;
background-repeat: no-repeat;
background-image: url("yourimage.gif");
}
.directory h3.swap span {
display: none;
}
*/
.directory > h3 {
margin-top: 0;
}
.directory p {
margin: 0px;
white-space: nowrap;
}
.directory div {
display: none;
margin: 0px;
}
.directory img {
vertical-align: -30%;
}
/* these are for tree view when not used as main index */
.directory-alt {
font-size: 100%;
font-weight: bold;
}
.directory-alt h3 {
margin: 0px;
margin-top: 1em;
font-size: 11pt;
}
.directory-alt > h3 {
margin-top: 0;
}
.directory-alt p {
margin: 0px;
white-space: nowrap;
}
.directory-alt div {
display: none;
margin: 0px;
}
.directory-alt img {
vertical-align: -30%;
}
/* @end */
address {
font-style: normal;
color: #333;
}
table.doxtable {
border-collapse: collapse;
}
table.doxtable td, table.doxtable th {
border: 1px solid #153788;
padding: 3px 7px 2px;
}
table.doxtable th {
background-color: #254798;
color: #FFFFFF;
font-size: 110%;
padding-bottom: 4px;
padding-top: 5px;
text-align: left;
}
dl.reflist dt, dl.reflist dd {
background-color: transparent;
background-image: none;
border: none;
box-shadow: none;
border-left: 1px solid black;
border-bottom-left-radius: 0px;
}
hr {
border-top: none;
border-bottom: 1px solid #CCCCCC;
margin-top: 30px;
padding-top: 10px;
}
.contents {
padding-top: 0px;
}
.contents .dynsection {
margin-top: 10px;
}
<!-- HTML footer for doxygen 1.8.7-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">$generatedby
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion
</li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/>
<address class="footer"><small>
$generatedby &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
</div>
</body>
</html>
<!-- HTML header for doxygen 1.8.7-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<link href='https://fonts.googleapis.com/css?family=Roboto:400' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto:500' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css"/>
$extrastylesheet
</head>
<body>
<div class="container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span>
<!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF-->
<div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
set(app_target renderApp)
# Qt stuff //////////////////////
find_package(OpenGL REQUIRED)
find_package(Qt5 COMPONENTS Core Widgets OpenGL REQUIRED)
......@@ -23,9 +21,38 @@ file(GLOB_RECURSE app_sources *.cpp)
file(GLOB_RECURSE app_headers *.hpp)
file(GLOB_RECURSE app_inlines *.inl)
file(GLOB_RECURSE app_uis *.ui)
set(app_sources
main.cpp
RenderingApplication.cpp
Renderer/AdvancedRenderer.cpp
Renderer/RenderPass.cpp
Renderer/SphereSampler.cpp
Gui/ControlDialogWindow.cpp
Gui/MainWindow.cpp
Gui/RendererControl.cpp
)
set(app_headers
RenderingApplication.hpp
Renderer/AdvancedRenderer.hpp
Renderer/RenderPass.hpp
Renderer/SphereSampler.hpp
Gui/ControlDialogWindow.hpp
Gui/MainWindow.hpp
Gui/RendererControl.hpp
)
set(app_inlines
)
set(app_uis
Gui/ui/MainWindow.ui
Gui/ui/RendererControl.ui
)
qt5_wrap_ui(app_uis_moc ${app_uis})
file(GLOB resources ${CMAKE_CURRENT_SOURCE_DIR}/../../*.qrc)
#file(GLOB resources ${CMAKE_CURRENT_SOURCE_DIR}/../../*.qrc)
set(app_resources
)
# Access to Radium headers and declarations/definitions
include_directories(
......@@ -37,24 +64,24 @@ include_directories(
# Generate an executable
add_executable(
${app_target}
${APPLICATION_NAME}
${app_sources}
${app_headers}
${app_inlines}
${app_uis_moc}
${resources}
${appresources}
)
#add_dependencies( ${app_target} ... )
# Link good libraries
target_link_libraries( ${app_target} # target
target_link_libraries(${APPLICATION_NAME} # target
${RADIUM_LIBRARIES} # Radium libs
${GLBINDING_LIBRARIES} ${GLOBJECTS_LIBRARIES} ${GLBINDINGAUX_LIBRARIES} # Radium dep
${Qt5_LIBRARIES} # the Qt beast
)
if (MSVC)
set_property( TARGET ${app_target} PROPERTY IMPORTED_LOCATION "${RADIUM_BINARY_OUTPUT_PATH}" )
set_property(TARGET ${APPLICATION_NAME} PROPERTY IMPORTED_LOCATION "${RADIUM_BINARY_OUTPUT_PATH}")
endif(MSVC)
......@@ -62,7 +62,6 @@ bool GeomPrePass::initializePass( int width, int height,
}
void GeomPrePass::addDepthTexture(const SharedTextures & depthTexture) {
depth_buffer = depthTexture.second.get();
addSharedTextures( {"GeomPrePass::Depth", depthTexture.second } );
}
......
......@@ -24,7 +24,7 @@ namespace globjects {
class Framebuffer;
}
/// Interface for renderpasses
/// Interface for RenderPasses
class RenderPass {
protected :
/// Alias for Render Object shared ptr
......@@ -52,7 +52,7 @@ class RenderPass {
resourceDir = std::move(resourcesRootDir);
}
// Get the resources directory
/// Get the resources directory
inline const std::string& getResourcesDir() const {
return resourceDir;
}
......@@ -118,6 +118,7 @@ class RenderPass {
private:
/// The name of the pass
std::string m_passName;
/// The base resources directory
std::string resourceDir { "./" };
};
......@@ -133,16 +134,20 @@ class GeomPrePass : public RenderPass {
void execute( const Ra::Engine::ViewingParameters& viewParams ) const override;
private:
/// The framebuffer used to render this pass
std::unique_ptr<globjects::Framebuffer> m_fbo {nullptr};
Ra::Engine::Texture *depth_buffer {nullptr};
/// The Shader manager to use when building shaders
Ra::Engine::ShaderProgramManager* m_shaderMngr {nullptr};
// maybe this might be factorized in an intermediate class
// TODO make this more efficient by
// removing the unused mapping
// rebuilding only what is necessary
/// Build the association between objects to render and their shader for this stage
/// maybe this might be factorized in an intermediate class
/// TODO make this more efficient by
/// - removing the unused mapping
/// - rebuilding only what is necessary
void buildShaderMap();
/// The mapping between renderobjects and their shader
std::map<RenderObjectPtr, const Ra::Engine::ShaderProgram *> m_shadersPerRo;
};
......
......@@ -122,12 +122,15 @@ class SphereSampler {
/// Get the sampling scheme as a Radium texture
Ra::Engine::Texture * asTexture();
/// Return the number of samples generated
int nbSamples() const { return m_nbPoints;}
private:
/// Texture generated on demand to be used with an OpenGL shader
std::unique_ptr<Ra::Engine::Texture> m_texture {nullptr};
/// Final number of points
int m_nbPoints;
/// The points on the sphere
Ra::Core::VectorArray<Ra::Core::Vector4> m_points;
};
......
......@@ -46,6 +46,8 @@ class RadiumPluginInterface;
} // namespace Ra
/// Main class for rendering Application.
/// This is a simplification of the main_app in Radium Engine
class RenderingApplication : public QApplication
{
Q_OBJECT
......@@ -53,6 +55,7 @@ class RenderingApplication : public QApplication
RenderingApplication( int argc, char** argv );
~RenderingApplication();
/// Advance the engine for one frame.
void oneFrame();
......@@ -78,6 +81,7 @@ class RenderingApplication : public QApplication
}
if ( m_isAboutToQuit ) { this->exit(); }
}
void setContinuousUpdate( bool b ) {
b ? m_continuousUpdateRequest++ : m_continuousUpdateRequest--;
if ( m_continuousUpdateRequest > 0 ) m_isUpdateNeeded.store( true );
......@@ -123,8 +127,6 @@ class RenderingApplication : public QApplication
/// Time since the last frame start.
Ra::Core::Utils::TimePoint m_lastFrameStart;
/// To use Radium Plugins, define the context
Ra::Plugins::Context m_pluginContext;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment