Skip to content
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

replace ADA w VERA #283

Merged
merged 35 commits into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4278a9b
preparing to vera moving scene definition out
patriciogonzalezvivo Jul 4, 2022
69a62b7
moving geometry loaders to ada
patriciogonzalezvivo Jul 6, 2022
49cfb7e
Removed submodule
patriciogonzalezvivo Jul 7, 2022
d074c5c
switching for vera repo
patriciogonzalezvivo Jul 7, 2022
4be4b16
moving some functions back to uniforms
patriciogonzalezvivo Jul 10, 2022
a3a3da4
simpler
patriciogonzalezvivo Jul 10, 2022
6ae0eb7
cleaning
patriciogonzalezvivo Jul 10, 2022
5df7505
cleaning
patriciogonzalezvivo Jul 10, 2022
b302883
new vera
patriciogonzalezvivo Jul 10, 2022
9cc190c
scene render
patriciogonzalezvivo Jul 10, 2022
f61c2b4
pcl plane generation
patriciogonzalezvivo Jul 12, 2022
a9b2868
no more billboard vbo and shader, improved pixeldensity
patriciogonzalezvivo Jul 15, 2022
bbee298
buffers back to uniforms
patriciogonzalezvivo Jul 16, 2022
0613d66
latest vera
patriciogonzalezvivo Jul 16, 2022
f928110
WebXR
patriciogonzalezvivo Jul 21, 2022
81186e3
shadowmap working again
patriciogonzalezvivo Jul 22, 2022
e9c21cb
latest vera
patriciogonzalezvivo Jul 23, 2022
c28210f
fullscreen
patriciogonzalezvivo Jul 23, 2022
e36b902
better support for holoplay
patriciogonzalezvivo Jul 24, 2022
786713f
fixing rpi
patriciogonzalezvivo Jul 24, 2022
77d3414
new vera
patriciogonzalezvivo Jul 26, 2022
b7ad199
Merge branch 'vera' of github.com:patriciogonzalezvivo/glslViewer int…
patriciogonzalezvivo Jul 26, 2022
065eb13
fixing issue w text
patriciogonzalezvivo Jul 28, 2022
c8f7145
sandbox:(VERA): prefer smart pointers over raw pointers
tcoyvwac Jul 29, 2022
efdc6c5
sandbox:(VERA): prefer smart pointers over raw pointers
tcoyvwac Jul 30, 2022
427115e
sandbox:(VERA): prefer smart pointers over raw pointers
tcoyvwac Jul 31, 2022
8921236
sandbox:(VERA): prefer smart pointers over raw pointers
tcoyvwac Jul 31, 2022
b1d1dcb
sandbox:(VERA): prefer smart pointers over raw pointers
tcoyvwac Jul 31, 2022
a5f0b47
sandbox:(VERA): prefer smart pointers over raw pointers
tcoyvwac Jul 31, 2022
a0a6f17
sandbox:(VERA): prefer smart pointers over raw pointers
tcoyvwac Jul 31, 2022
624cea7
scale font
patriciogonzalezvivo Aug 1, 2022
a3a49a0
Merge branch 'main' into vera
patriciogonzalezvivo Aug 1, 2022
b1cef59
Merge pull request #277 from tcoyvwac/fix/vera/prefer-smart-pointer-o…
patriciogonzalezvivo Aug 1, 2022
37a6434
styling
patriciogonzalezvivo Aug 1, 2022
3104066
Merge branch 'main' into vera
patriciogonzalezvivo Aug 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,24 @@ jobs:
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1

- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
$FfmpegUri = 'https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n4.4-latest-win64-lgpl-shared-4.4.zip'
$FfmpegZipPath = "$Env:GITHUB_WORKSPACE\ffmpeg.zip"
$ZlibUri = 'https://sourceforge.net/projects/gnuwin32/files/zlib/1.2.3/zlib-1.2.3-lib.zip/download'
$ZlibZipPath = "$Env:GITHUB_WORKSPACE\zlib.zip"
# - name: Install dependencies (Windows)
# if: matrix.os == 'windows-latest'
# run: |
# $FfmpegUri = 'https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n4.4-latest-win64-lgpl-shared-4.4.zip'
# $FfmpegZipPath = "$Env:GITHUB_WORKSPACE\ffmpeg.zip"
# $ZlibUri = 'https://sourceforge.net/projects/gnuwin32/files/zlib/1.2.3/zlib-1.2.3-lib.zip/download'
# $ZlibZipPath = "$Env:GITHUB_WORKSPACE\zlib.zip"

$FfmpegPath = "$Env:GITHUB_WORKSPACE\ffmpeg"
# $FfmpegPath = "$Env:GITHUB_WORKSPACE\ffmpeg"

Start-BitsTransfer -Source "$FfmpegUri","$ZlibUri" -Destination "$FfmpegZipPath","$ZlibZipPath"
# Start-BitsTransfer -Source "$FfmpegUri","$ZlibUri" -Destination "$FfmpegZipPath","$ZlibZipPath"

Expand-Archive -Path "$FfmpegZipPath" -DestinationPath "$FfmpegPath"
Move-Item -Path "$FfmpegPath\ffmpeg-*\*" -Destination "$FfmpegPath"
# Expand-Archive -Path "$FfmpegZipPath" -DestinationPath "$FfmpegPath"
# Move-Item -Path "$FfmpegPath\ffmpeg-*\*" -Destination "$FfmpegPath"

Expand-Archive -Path "$ZlibZipPath" -DestinationPath "$FfmpegPath"
# Expand-Archive -Path "$ZlibZipPath" -DestinationPath "$FfmpegPath"

echo "CMAKE_PREFIX_PATH=$FfmpegPath" >>$Env:GITHUB_ENV
# echo "CMAKE_PREFIX_PATH=$FfmpegPath" >>$Env:GITHUB_ENV

- name: Build
run: ${{ matrix.build_command }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ premake5.exe
build/
build_wasm/

.vscode/*.log

CMakeFiles
cmake_install.cmake
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "deps/ada"]
path = deps/ada
url = https://github.com/patriciogonzalezvivo/ada.git
[submodule "deps/vera"]
path = deps/vera
url = git@github.com:patriciogonzalezvivo/vera.git
3 changes: 2 additions & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"/usr/local/include"
]
},
"intelliSenseMode": "clang-x64"
"intelliSenseMode": "clang-x64",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
Expand Down
28 changes: 11 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
cmake_minimum_required(VERSION 3.2)

set(VERSION_MAJOR 2)
set(VERSION_MINOR 1)
set(VERSION_PATCH 2)
set(VERSION_MAJOR 3)
set(VERSION_MINOR 0)
set(VERSION_PATCH 0)
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")

project(glslViewer
VERSION ${VERSION}
LANGUAGES CXX )
VERSION ${VERSION}
LANGUAGES CXX )

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# The compiled ADA
# The compiled vera
add_subdirectory(deps)

if(MSVC)
Expand All @@ -26,22 +26,14 @@ endif()

file(GLOB ROOT_SOURCE
"${PROJECT_SOURCE_DIR}/src/*.cpp"
"${PROJECT_SOURCE_DIR}/src/gl/*.cpp"
"${PROJECT_SOURCE_DIR}/src/io/*.cpp"
"${PROJECT_SOURCE_DIR}/src/types/*.cpp"
"${PROJECT_SOURCE_DIR}/src/tools/*.cpp"
)

add_executable(glslViewer ${ROOT_SOURCE})

# set_target_properties(glslViewer PROPERTIES
# CXX_STANDARD 11
# CXX_STANDARD_REQUIRED ON
# )

include_directories(deps/liblo)
target_include_directories(glslViewer PRIVATE deps)
target_link_libraries(glslViewer PRIVATE ada phonedepth)
target_link_libraries(glslViewer PRIVATE vera)
target_compile_definitions(glslViewer PRIVATE GLSLVIEWER_VERSION_MAJOR=${VERSION_MAJOR})
target_compile_definitions(glslViewer PRIVATE GLSLVIEWER_VERSION_MINOR=${VERSION_MINOR})
target_compile_definitions(glslViewer PRIVATE GLSLVIEWER_VERSION_PATCH=${VERSION_PATCH})
Expand All @@ -60,6 +52,7 @@ if (EMSCRIPTEN)

set(LFLAGS "${LFLAGS} -s ALLOW_MEMORY_GROWTH=1")
set(LFLAGS "${LFLAGS} -s NO_DYNAMIC_EXECUTION=1")
# set(LFLAGS "${LFLAGS} -s NO_DISABLE_EXCEPTION_CATCHING")

# Copy the default index.html
file(COPY assets/index.html DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
Expand All @@ -78,7 +71,6 @@ if (EMSCRIPTEN)
set(LFLAGS "${LFLAGS} --preload-file examples/3D/01_lighting/04_fresnel.vert")
set(LFLAGS "${LFLAGS} --preload-file examples/3D/01_lighting/04_fresnel.frag")
set(LFLAGS "${LFLAGS} --preload-file examples/3D/01_lighting/uffizi_cross.jpg")
set(LFLAGS "${LFLAGS} --preload-file examples/3D/01_lighting/uffizi_latlong.jpg")
set(LFLAGS "${LFLAGS} --preload-file examples/3D/03_models/duck.glb")
# set(LFLAGS "${LFLAGS} --preload-file examples/3D/03_models/default.mtl")
# set(LFLAGS "${LFLAGS} --preload-file examples/3D/03_models/default.png")
Expand All @@ -92,9 +84,11 @@ if (EMSCRIPTEN)
# set(LFLAGS "${LFLAGS} --preload-file examples/3D/04_vertex/physarum.vert")
# set(LFLAGS "${LFLAGS} --preload-file examples/3D/04_vertex/spin.vert")
# set(LFLAGS "${LFLAGS} --preload-file examples/3D/04_vertex/stars.vert")
# set(LFLAGS "${LFLAGS} --preload-file examples/3D/04_vertex/gpgpu.frag")
# set(LFLAGS "${LFLAGS} --preload-file examples/3D/04_vertex/gpgpu.vert")

set_target_properties(glslViewer PROPERTIES LINK_FLAGS "${LFLAGS}")
target_link_libraries(glslViewer PRIVATE glfw)
target_link_libraries(glslViewer PRIVATE glfw webxr)

else()
find_package(Curses)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@ Thanks to:
* [Philip Rideout](http://prideout.net/) and [Romain Guy](http://www.curious-creature.com/) general generosity to share their code and experience

* [Sergei B](https://github.com/bespsm) for adding support for Audio textures


31 changes: 27 additions & 4 deletions assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,30 @@
-webkit-touch-callout: none;
}

.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
.emscripten {
padding-right: 0;
margin-left: auto;
margin-right: auto;
display: block;

position: relative;
top: 0px;
left: 0px;
margin: 0px;
border: 0;
/*width: 100%; //this will set canvas size full screen
height: 100%;*/
overflow: hidden;
display: block;
image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -o-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: optimize-contrast;
image-rendering: crisp-edges;
image-rendering: pixelated;
-ms-interpolation-mode: nearest-neighbor;
}
div.emscripten { text-align: center; }
canvas.emscripten {
position: absolute;
Expand Down Expand Up @@ -172,8 +195,8 @@
// arguments: ["examples/3D/03_models/duck.glb", "examples/3D/01_lighting/00_gooch.frag", "-e", "buffers,on"],
// arguments: ["examples/3D/03_models/duck.glb", "examples/3D/01_lighting/01_shadows.frag", "-e", "buffers,on"],
// arguments: ["examples/3D/03_models/duck.glb", "examples/3D/01_lighting/04_fresnel.vert", "examples/3D/01_lighting/04_fresnel.frag", "-C", "examples/3D/01_lighting/uffizi_cross.jpg"],
arguments: ["examples/3D/03_models/duck.glb", "-e", "debug,on", "-e", "axis,off", "-C", "examples/3D/01_lighting/uffizi_cross.jpg"],
// arguments: ["examples/3D/03_models/duck.glb", "--fxaa", "-e", "buffers,on"],
// arguments: ["examples/3D/03_models/duck.glb", "-e", "debug,on", "-e", "axis,off", "--msaa"],
arguments: ["examples/3D/03_models/duck.glb", "--fxaa"],
// arguments: ["examples/3D/03_models/duck.glb", "--msaa", "--fxaa", "-e", "buffers,on"],
// arguments: ["examples/3D/04_vertex/pcl.ply", "examples/3D/04_vertex/stars.vert", "examples/3D/04_vertex/pcl.frag"],
// arguments: ["examples/3D/04_vertex/pcl.ply", "examples/3D/04_vertex/stars.vert", "examples/3D/04_vertex/pcl_trail.frag"],
Expand Down Expand Up @@ -245,4 +268,4 @@

</script>
<script async type="text/javascript" src="glslViewer.js"></script>
</html>
</html>
3 changes: 1 addition & 2 deletions deps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## Ada
add_subdirectory(ada)
add_subdirectory(phonedepth)
add_subdirectory(vera)

if (NOT EMSCRIPTEN)
add_subdirectory(liblo/cmake)
Expand Down
1 change: 0 additions & 1 deletion deps/ada
Submodule ada deleted from 32f3e8
7 changes: 0 additions & 7 deletions deps/phonedepth/CMakeLists.txt

This file was deleted.

21 changes: 0 additions & 21 deletions deps/phonedepth/LICENSE

This file was deleted.

Loading