Skip to content

Commit

Permalink
Deploying to gh-pages from @ f046fb8 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Meakk committed Nov 18, 2024
1 parent f3d875b commit 3b3fcba
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/js/search-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},"7": {
"doc": "Build",
"title": "Build",
"content": "# Build guide F3D uses a CMake based build system, so building F3D just requires installing needed dependencies, configuring and building. If you are not used to such processes please take a look at our [getting started guide](/doc/dev/GETTING_STARTED.html). ## Dependencies * [CMake](https://cmake.org) >= 3.1. * [VTK](https://vtk.org) >= 9.2.6 (9.3.1 recommended). * A C++17 compiler. * A CMake-compatible build system (Visual Studio, XCode, Ninja, Make, etc.). * Optionally, [Assimp](https://www.assimp.org/) >= 5.0. * Optionally, Open CASCADE [OCCT](https://dev.opencascade.org/) >= 7.5.2. * Optionally, [Alembic](http://www.alembic.io/) >= 1.7. * Optionally, [OpenUSD](https://openusd.org/release/index.html) >= 23.05. * Optionally, [OpenVDB](https://www.openvdb.org/download/) >= 10.0.0, enable `IOOpenVDB` VTK module. * Optionally, [Draco](https://google.github.io/draco/) >= 1.5. * Optionally, [Python](https://www.python.org/) >= 3.6 and [pybind11](https://github.com/pybind/pybind11) >= 2.2. * Optionally, [Java](https://www.java.com) >= 18. * Optionally, [OpenEXR](https://openexr.com/en/latest/) >= 3.0. ## VTK compatibility As stated in the dependencies, F3D is compatible with VTK >= 9.2.6, however, some features may not be available. We suggest using VTK 9.3.1 with RenderingRayTracing, RenderingExternal, IOExodus and IOOpenVDB modules enabled in order to get as many features as possible in F3D. ## Configuration and building Configure and generate the project with CMake, then build the software using your build system. Here is some CMake options of interest: * `F3D_BUILD_APPLICATION`: Build the F3D executable. * `BUILD_TESTING`: Enable the [tests](/doc/dev/TESTING.html). * `F3D_MACOS_BUNDLE`: On macOS, build a `.app` bundle. * `F3D_WINDOWS_GUI`: On Windows, build a Win32 application (without console). * `F3D_WINDOWS_BUILD_SHELL_THUMBNAILS_EXTENSION`: On Windows, build the shell thumbnails extension. * `F3D_PLUGINS_STATIC_BUILD`: Build all plugins as static library (embedded into `libf3d`) and automatically loaded by the application. Incompatible with `F3D_MACOS_BUNDLE`. * `BUILD_SHARED_LIBS`: Build the libf3d and all plugins as static library (embedded into `f3d` executable). The `library` and `plugin_sdk` component will not be installed. Some modules, plugins and bindings depending on external libraries can be optionally enabled with the following CMake variables: * `F3D_MODULE_RAYTRACING`: Support for raytracing rendering. Requires that VTK has been built with `OSPRay` and `VTK_MODULE_ENABLE_VTK_RenderingRayTracing` turned on. Disabled by default. * `F3D_MODULE_EXTERNAL_RENDERING`: Support for external render window. Requires that VTK has been built with `VTK_MODULE_ENABLE_VTK_RenderingExternal` turned on. Disabled by default. * `F3D_MODULE_EXR`: Support for OpenEXR images. Requires `OpenEXR`. Disabled by default. * `F3D_PLUGIN_BUILD_EXODUS`: Support for ExodusII (.ex2) file format. Requires that VTK has been built with `IOExodus` module (and `hdf5`). Enabled by default. * `F3D_PLUGIN_BUILD_OCCT`: Support for STEP, IGES, BREP, and XBF file formats. Requires `OpenCASCADE`. Disabled by default. * `F3D_PLUGIN_BUILD_ASSIMP`: Support for FBX, DAE, OFF, DXF, X and 3MF file formats. Requires `Assimp`. Disabled by default. * `F3D_PLUGIN_BUILD_ALEMBIC`: Support for ABC file format. Requires `Alembic`. Disabled by default. * `F3D_PLUGIN_BUILD_DRACO`: Support for DRC file format. Requires `Draco`. Disabled by default. * `F3D_PLUGIN_BUILD_USD`: Support for USD file format. Requires `OpenUSD`. Disabled by default. * `F3D_PLUGIN_BUILD_VDB`: Support for VDB file format. Requires that VTK has been built with `IOOpenVDB` module (and `OpenVDB`). Disabled by default. * `F3D_BINDINGS_PYTHON`: Generate python bindings (requires `Python` and `pybind11`). Disabled by default. * `F3D_BINDINGS_JAVA`: Generate java bindings (requires `Java` and `JNI`). Disabled by default. ## VCPKG It's possible to use VCPKG to automatically build dependencies. A manifest file `vcpkg.json` is available at your convenience. Please read [VCPKG documentation](https://vcpkg.io/en/getting-started.html). Basically, just install VCPKG, and configure F3D using `-DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake` option. ## Installing Installation can be done through CMake, by running the following command: ``` cmake --install ${your_build_dir} ``` Individual components can also be installed by specifying the component name: ``` cmake --install ${your_build_dir} --component ${component_name} ``` Here is the list of all the components: Name|Installed by default|Operating system|Description ------|------|------|------ `application`|YES|ALL|F3D application. `configuration`|NO|ALL|Default configuration files, `config` and `thumbnail`. `library`|YES|ALL|libf3d library binaries. `plugin`|YES|ALL|libf3d plugins. `dependencies`|NO|ALL|libf3d runtime dependencies. Can be used to create a self-contained and relocatable package. System libraries are excluded. `sdk`|NO|ALL|libf3d SDK (headers and CMake config files) for `library` and `application` find_package components. `plugin_sdk`|NO|ALL|libf3d plugin SDK (headers and CMake config files including macros) for `pluginsdk` find_package components. `licenses`|YES|ALL|F3D and third party licenses. `documentation`|YES|Linux|`man` documentation. `shellext`|YES|Windows/Linux|Desktop integration. `python`|YES|ALL|Python bindings. `java`|YES|ALL|Java bindings. `mimetypes`|NO|Linux|Plugins mimetype XML files for integration with Freedesktop. `assets`|YES|Linux|Assets for integration with Freedesktop. `colormaps`|NO|ALL|Color maps presets, see [documentation](/doc/user/COLOR_MAPS.html) ",
"content": "# Build guide F3D uses a CMake based build system, so building F3D just requires installing needed dependencies, configuring and building. If you are not used to such processes please take a look at our [getting started guide](/doc/dev/GETTING_STARTED.html). ## Dependencies * [CMake](https://cmake.org) >= 3.1. * [VTK](https://vtk.org) >= 9.2.6 (9.3.1 recommended). * A C++17 compiler. * A CMake-compatible build system (Visual Studio, XCode, Ninja, Make, etc.). * Optionally, [Assimp](https://www.assimp.org/) >= 5.0. * Optionally, Open CASCADE [OCCT](https://dev.opencascade.org/) >= 7.5.2. * Optionally, [Alembic](http://www.alembic.io/) >= 1.7. * Optionally, [OpenUSD](https://openusd.org/release/index.html) >= 23.05. * Optionally, [OpenVDB](https://www.openvdb.org/download/) >= 10.0.0, enable `IOOpenVDB` VTK module. * Optionally, [Draco](https://google.github.io/draco/) >= 1.5. * Optionally, [Python](https://www.python.org/) >= 3.6 and [pybind11](https://github.com/pybind/pybind11) >= 2.2. * Optionally, [Java](https://www.java.com) >= 18. * Optionally, [OpenEXR](https://openexr.com/en/latest/) >= 3.0. ## VTK compatibility As stated in the dependencies, F3D is compatible with VTK >= 9.2.6, however, some features may not be available. We suggest using VTK 9.3.1 with RenderingRayTracing, IOExodus and IOOpenVDB modules enabled in order to get as many features as possible in F3D. ## Configuration and building Configure and generate the project with CMake, then build the software using your build system. Here is some CMake options of interest: * `F3D_BUILD_APPLICATION`: Build the F3D executable. * `BUILD_TESTING`: Enable the [tests](/doc/dev/TESTING.html). * `F3D_MACOS_BUNDLE`: On macOS, build a `.app` bundle. * `F3D_WINDOWS_GUI`: On Windows, build a Win32 application (without console). * `F3D_WINDOWS_BUILD_SHELL_THUMBNAILS_EXTENSION`: On Windows, build the shell thumbnails extension. * `F3D_PLUGINS_STATIC_BUILD`: Build all plugins as static library (embedded into `libf3d`) and automatically loaded by the application. Incompatible with `F3D_MACOS_BUNDLE`. * `BUILD_SHARED_LIBS`: Build the libf3d and all plugins as static library (embedded into `f3d` executable). The `library` and `plugin_sdk` component will not be installed. Some modules, plugins and bindings depending on external libraries can be optionally enabled with the following CMake variables: * `F3D_MODULE_RAYTRACING`: Support for raytracing rendering. Requires that VTK has been built with `OSPRay` and `VTK_MODULE_ENABLE_VTK_RenderingRayTracing` turned on. Disabled by default. * `F3D_MODULE_EXR`: Support for OpenEXR images. Requires `OpenEXR`. Disabled by default. * `F3D_PLUGIN_BUILD_EXODUS`: Support for ExodusII (.ex2) file format. Requires that VTK has been built with `IOExodus` module (and `hdf5`). Enabled by default. * `F3D_PLUGIN_BUILD_OCCT`: Support for STEP, IGES, BREP, and XBF file formats. Requires `OpenCASCADE`. Disabled by default. * `F3D_PLUGIN_BUILD_ASSIMP`: Support for FBX, DAE, OFF, DXF, X and 3MF file formats. Requires `Assimp`. Disabled by default. * `F3D_PLUGIN_BUILD_ALEMBIC`: Support for ABC file format. Requires `Alembic`. Disabled by default. * `F3D_PLUGIN_BUILD_DRACO`: Support for DRC file format. Requires `Draco`. Disabled by default. * `F3D_PLUGIN_BUILD_USD`: Support for USD file format. Requires `OpenUSD`. Disabled by default. * `F3D_PLUGIN_BUILD_VDB`: Support for VDB file format. Requires that VTK has been built with `IOOpenVDB` module (and `OpenVDB`). Disabled by default. * `F3D_BINDINGS_PYTHON`: Generate python bindings (requires `Python` and `pybind11`). Disabled by default. * `F3D_BINDINGS_JAVA`: Generate java bindings (requires `Java` and `JNI`). Disabled by default. ## VCPKG It's possible to use VCPKG to automatically build dependencies. A manifest file `vcpkg.json` is available at your convenience. Please read [VCPKG documentation](https://vcpkg.io/en/getting-started.html). Basically, just install VCPKG, and configure F3D using `-DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake` option. ## Installing Installation can be done through CMake, by running the following command: ``` cmake --install ${your_build_dir} ``` Individual components can also be installed by specifying the component name: ``` cmake --install ${your_build_dir} --component ${component_name} ``` Here is the list of all the components: Name|Installed by default|Operating system|Description ------|------|------|------ `application`|YES|ALL|F3D application. `configuration`|NO|ALL|Default configuration files, `config` and `thumbnail`. `library`|YES|ALL|libf3d library binaries. `plugin`|YES|ALL|libf3d plugins. `dependencies`|NO|ALL|libf3d runtime dependencies. Can be used to create a self-contained and relocatable package. System libraries are excluded. `sdk`|NO|ALL|libf3d SDK (headers and CMake config files) for `library` and `application` find_package components. `plugin_sdk`|NO|ALL|libf3d plugin SDK (headers and CMake config files including macros) for `pluginsdk` find_package components. `licenses`|YES|ALL|F3D and third party licenses. `documentation`|YES|Linux|`man` documentation. `shellext`|YES|Windows/Linux|Desktop integration. `python`|YES|ALL|Python bindings. `java`|YES|ALL|Java bindings. `mimetypes`|NO|Linux|Plugins mimetype XML files for integration with Freedesktop. `assets`|YES|Linux|Assets for integration with Freedesktop. `colormaps`|NO|ALL|Color maps presets, see [documentation](/doc/user/COLOR_MAPS.html) ",
"url": "/doc/dev/BUILD.html",

"relUrl": "/doc/dev/BUILD.html"
Expand Down
2 changes: 1 addition & 1 deletion doc/dev/BUILD.html

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions doc/dev/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ please take a look at our [getting started guide](GETTING_STARTED.md).

## VTK compatibility

As stated in the dependencies, F3D is compatible with VTK >= 9.2.6, however, some features may not be available. We suggest using VTK 9.3.1 with RenderingRayTracing, RenderingExternal, IOExodus and IOOpenVDB modules enabled in order to get as many features as possible in F3D.
As stated in the dependencies, F3D is compatible with VTK >= 9.2.6, however, some features may not be available. We suggest using VTK 9.3.1 with RenderingRayTracing, IOExodus and IOOpenVDB modules enabled in order to get as many features as possible in F3D.

## Configuration and building

Expand All @@ -41,7 +41,6 @@ Here is some CMake options of interest:
Some modules, plugins and bindings depending on external libraries can be optionally enabled with the following CMake variables:

* `F3D_MODULE_RAYTRACING`: Support for raytracing rendering. Requires that VTK has been built with `OSPRay` and `VTK_MODULE_ENABLE_VTK_RenderingRayTracing` turned on. Disabled by default.
* `F3D_MODULE_EXTERNAL_RENDERING`: Support for external render window. Requires that VTK has been built with `VTK_MODULE_ENABLE_VTK_RenderingExternal` turned on. Disabled by default.
* `F3D_MODULE_EXR`: Support for OpenEXR images. Requires `OpenEXR`. Disabled by default.
* `F3D_PLUGIN_BUILD_EXODUS`: Support for ExodusII (.ex2) file format. Requires that VTK has been built with `IOExodus` module (and `hdf5`). Enabled by default.
* `F3D_PLUGIN_BUILD_OCCT`: Support for STEP, IGES, BREP, and XBF file formats. Requires `OpenCASCADE`. Disabled by default.
Expand Down
1 change: 1 addition & 0 deletions vtkext/private/module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ set(classes
vtkF3DCachedSpecularTexture
vtkF3DConsoleOutputWindow
vtkF3DDropZoneActor
vtkF3DExternalRenderWindow
vtkF3DGenericImporter
vtkF3DHexagonalBokehBlurPass
vtkF3DInteractorEventRecorder
Expand Down
1 change: 0 additions & 1 deletion vtkext/private/module/vtk.module
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ PRIVATE_DEPENDS
VTK::RenderingVolumeOpenGL2
OPTIONAL_DEPENDS
VTK::opengl
VTK::RenderingExternal
VTK::RenderingRayTracing
TEST_DEPENDS
VTK::IOGeometry
Expand Down
1 change: 0 additions & 1 deletion vtkext/private/module/vtkF3DConfigure.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ static const std::string F3D_EXIT_HOTKEY_SYM = "Escape";
// TODO: Use CMake definitions and get rid of these
#cmakedefine01 F3D_WINDOWS_GUI

#cmakedefine01 F3D_MODULE_EXTERNAL_RENDERING
#cmakedefine01 F3D_MODULE_RAYTRACING
#cmakedefine01 F3D_MODULE_EXR
#endif
42 changes: 42 additions & 0 deletions vtkext/private/module/vtkF3DExternalRenderWindow.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#include <vtkObjectFactory.h>
#include <vtkOpenGLFramebufferObject.h>
#include <vtkOpenGLState.h>

#include "vtkF3DExternalRenderWindow.h"

vtkStandardNewMacro(vtkF3DExternalRenderWindow);

//------------------------------------------------------------------------------
vtkF3DExternalRenderWindow::vtkF3DExternalRenderWindow()
{
this->FrameBlitMode = BlitToCurrent;
}

//------------------------------------------------------------------------------
vtkF3DExternalRenderWindow::~vtkF3DExternalRenderWindow() = default;

//------------------------------------------------------------------------------
void vtkF3DExternalRenderWindow::Start()
{
// creates or resizes the framebuffer
this->Size[0] = (this->Size[0] > 0 ? this->Size[0] : 300);
this->Size[1] = (this->Size[1] > 0 ? this->Size[1] : 300);
this->CreateFramebuffers(this->Size[0], this->Size[1]);

this->GetState()->PushFramebufferBindings();

this->BlitToRenderFramebuffer(true);
this->RenderFramebuffer->Bind();
}

//------------------------------------------------------------------------------
void vtkF3DExternalRenderWindow::Render()
{
if (!this->Initialized)
{
// skip vtkGenericOpenGLRenderWindow because it calls OpenGL before it's even initialized
this->vtkOpenGLRenderWindow::OpenGLInit();
}

this->Superclass::Render();
}
40 changes: 40 additions & 0 deletions vtkext/private/module/vtkF3DExternalRenderWindow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* @class vtkF3DExternalRenderWindow
* @brief external context render window
*/

#ifndef vtkF3DExternalRenderWindow_h
#define vtkF3DExternalRenderWindow_h

#include "vtkGenericOpenGLRenderWindow.h"

class vtkF3DExternalRenderWindow : public vtkGenericOpenGLRenderWindow
{
public:
static vtkF3DExternalRenderWindow* New();
vtkTypeMacro(vtkF3DExternalRenderWindow, vtkGenericOpenGLRenderWindow);

/**
* Begin the rendering process using the existing context.
*/
void Start() override;

/**
* An external context is always considered current.
*/
bool IsCurrent() override { return true; }

/**
* Trigger rendering. Reimplemented to ensure OpenGL is initialized.
*/
void Render() override;

protected:
vtkF3DExternalRenderWindow();
~vtkF3DExternalRenderWindow() override;

private:
vtkF3DExternalRenderWindow(const vtkF3DExternalRenderWindow&) = delete;
void operator=(const vtkF3DExternalRenderWindow&) = delete;
};
#endif // vtkF3DExternalRenderWindow_h
2 changes: 1 addition & 1 deletion web/f3d.js

Large diffs are not rendered by default.

Binary file modified web/f3d.wasm
Binary file not shown.

0 comments on commit 3b3fcba

Please sign in to comment.