Skip to content

Commit

Permalink
BRAYNS 558 - Migrate cylindric camera to OSPRay (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
NadirRoGue authored Jun 26, 2023
1 parent 0403cf9 commit 1095bb8
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 236 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.viz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ ubuntu-clangformat-check:

# Install OSPRay
# https://github.com/ospray/ospray/releases
- OSPRAY_TAG=v2.10.4
- OSPRAY_TAG=v2.10.5
- OSPRAY_SRC=/app/ospray

- mkdir -p ${OSPRAY_SRC}
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Get ISPC
# https://ispc.github.io/downloads.html

ARG ISPC_VERSION=1.18.0
ARG ISPC_DIR=ispc-v${ISPC_VERSION}-linux
ARG ISPC_PATH=/app/ispc-v1.18.0-linux

RUN mkdir -p ${ISPC_PATH} \
&& wget https://github.com/ispc/ispc/releases/download/v1.18.0/${ISPC_DIR}.tar.gz \
&& tar zxvf ${ISPC_DIR}.tar.gz -C ${ISPC_PATH} --strip-components=1 \
Expand All @@ -52,7 +49,6 @@ RUN wget https://github.com/oneapi-src/oneTBB/releases/download/v${ONETBB_VERSIO
&& tar zxvf ${ONETBB_FILE} -C ${DIST_PATH} --strip-components=1

# Install embree
# https://github.com/embree/embree/releases
ARG EMBREE_VERSION=3.13.3
ARG EMBREE_FILE=embree-${EMBREE_VERSION}.x86_64.linux.tar.gz
RUN wget https://github.com/embree/embree/releases/download/v${EMBREE_VERSION}/${EMBREE_FILE} \
Expand Down Expand Up @@ -88,7 +84,7 @@ RUN mkdir ${OPENVKL_SRC} \
&& ninja -j4 install

# Install OSPRay
ARG OSPRAY_TAG=v2.10.4
ARG OSPRAY_TAG=v2.10.5
ARG OSPRAY_SRC=/app/ospray

RUN mkdir -p ${OSPRAY_SRC} \
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The following components must be installed on the system where Brayns will be bu
* Package config
* SSL Development files
* Python 3.9 or higher
* Custom OSPRay 2.10.4 (https://github.com/BlueBrain/ospray/tree/v2.10.4)
* Custom OSPRay 2.10.5 (https://github.com/BlueBrain/ospray/tree/v2.10.5)
* zlib

Optionally, to build the core plugins of Brayns, the following components are required.
Expand All @@ -50,10 +50,10 @@ Brayns uses further dependencies, but if they are not present on the system, it
* spdlog 1.9.2 (https://github.com/gabime/spdlog/tree/v1.9.2)
* stb (https://github.com/nothings/stb)
* tinyexr (https://github.com/syoyo/tinyexr/tree/v1.0.1)
* libsonata 0.1.20 (https://github.com/BlueBrain/libsonata/tree/v0.1.20)
* libsonata 0.1.22 (https://github.com/BlueBrain/libsonata/tree/v0.1.22)
* MVDTool 2.4.4 (https://github.com/BlueBrain/MVDTool/tree/v2.4.4)
* MorphIO 3.3.4 (https://github.com/BlueBrain/MorphIO/tree/v3.3.4)
* Brion 3.3.9 (https://github.com/BlueBrain/Brion/tree/3.3.9)
* MorphIO 3.3.5 (https://github.com/BlueBrain/MorphIO/tree/v3.3.5)
* Brion 3.3.14 (https://github.com/BlueBrain/Brion/tree/3.3.14)

### Build command

Expand Down
4 changes: 0 additions & 4 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ if(BRAYNS_ATLASEXPLORER_ENABLED)
find_package(BZip2 REQUIRED)
endif()

if(BRAYNS_CYLINDRICCAMERA_ENABLED)
find_package(rkcommon REQUIRED)
endif()

add_subdirectory(deps)

if(BRAYNS_CIRCUITEXPLORER_ENABLED)
Expand Down
18 changes: 0 additions & 18 deletions plugins/CylindricCamera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,19 @@
#
# This file is part of Brayns <https://github.com/BlueBrain/Brayns>

list(APPEND CMAKE_MODULE_PATH ${OSPRAY_CMAKE_ROOT})
include(osprayUse)

file(GLOB_RECURSE BRAYNSCYLINDRICCAMERA_SOURCES RELATIVE ${CMAKE_CURRENT_LIST_DIR} *.cpp)
file(GLOB_RECURSE BRAYNSCYLINDRICCAMERA_HEADERS RELATIVE ${CMAKE_CURRENT_LIST_DIR} *.h)
file(GLOB_RECURSE BRAYNSCYLINDRICCAMERA_ISPC_SOURCES RELATIVE ${CMAKE_CURRENT_LIST_DIR} *.ispc)

ispc_include_directories(${CMAKE_CURRENT_LIST_DIR}
${OSPRAY_INCLUDE_DIR}
${OSPRAY_INCLUDE_DIR}/ospray/SDK/modules/cpu)
ispc_compile(${BRAYNSCYLINDRICCAMERA_ISPC_SOURCES})
list(APPEND BRAYNSCYLINDRICCAMERA_SOURCES ${ISPC_OBJECTS})

add_library(braynsCylindricCamera SHARED ${BRAYNSCYLINDRICCAMERA_SOURCES} ${BRAYNSCYLINDRICCAMERA_HEADERS})

target_include_directories(braynsCylindricCamera PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>"
"$<INSTALL_INTERFACE:include>")

target_include_directories(braynsCylindricCamera PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/camera # to find the autogenerated *_ispc.h file
${OSPRAY_INCLUDE_DIR} # to fix relative imports within Ospray SDK
${OSPRAY_INCLUDE_DIR}/ospray/SDK/common
${OSPRAY_INCLUDE_DIR}/ospray/SDK/modules/cpu
${RKCOMMON_INCLUDE_DIRS})

target_link_libraries(braynsCylindricCamera PRIVATE
braynsEngine
braynsPluginAPI
braynsNetwork
rkcommon::rkcommon
ospray::ospray
ospray::ospray_sdk
ospray::ospray_module_cpu)
Expand Down
3 changes: 0 additions & 3 deletions plugins/CylindricCamera/CylindricCameraPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@
#include <brayns/utils/Log.h>

#include "camera/CylindricAdapter.h"
#include "camera/ospray/OsprayCylindricCamera.h"
#include "network/entrypoints/CylindricCameraEntrypoint.h"

CylindricCameraPlugin::CylindricCameraPlugin(brayns::PluginAPI &api)
{
ospray::Camera::registerType<OsprayCylindricCamera>(brayns::ProjectionTraits<Cylindric>::name.c_str());

auto &engine = api.getEngine();
auto &factories = engine.getFactories();
auto &cameras = factories.cameras;
Expand Down
56 changes: 0 additions & 56 deletions plugins/CylindricCamera/camera/ospray/OsprayCylindricCamera.cpp

This file was deleted.

41 changes: 0 additions & 41 deletions plugins/CylindricCamera/camera/ospray/OsprayCylindricCamera.h

This file was deleted.

52 changes: 0 additions & 52 deletions plugins/CylindricCamera/camera/ospray/OsprayCylindricCamera.ispc

This file was deleted.

This file was deleted.

0 comments on commit 1095bb8

Please sign in to comment.