Nautilus

The complete graphics engine
Alternatives To Nautilus
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Stb23,186
2 days ago190otherC
stb single-file public domain libraries for C/C++
Tinyrenderer17,749
22 days ago41otherC++
A brief computer graphics / rendering course
Filament16,323279 hours ago119August 01, 2023116apache-2.0C++
Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
3d Game Shaders For Beginners15,637
3 months ago19bsd-3-clauseC++
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Magictools11,958
a month ago4mit
:video_game: :pencil: A list of Game Development resources to make magic happen.
Spritejs5,2466294 days ago432December 13, 202268mitJavaScript
A cross platform high-performance graphics system.
Tinyraytracer4,594
3 months ago14C++
A brief computer graphics / rendering course
Magnum4,500
a day ago87otherC++
Lightweight and modular C++11 graphics middleware for games and data visualization
Webglstudio.js4,064
3 years ago31mitJavaScript
A full open source 3D graphics editor in the browser, with scene editor, coding pad, graph editor, virtual file system, and many features more.
Engine3,721183 days ago278June 21, 2023253mitTypeScript
A typescript interactive engine, support 2D, 3D, animation, physics, built on WebGL and glTF.
Alternatives To Nautilus
Select To Compare


Alternative Project Comparisons
Readme

nautilus

Nautilus Icon

Build Status build Windows C/C++ CI Linux C/C++ CI macOS C/C++ CI CircleCI Maintenance GitHub issues GitHub issues-closed PRs Welcome GitHub pull-requests GitHub pull-requests closed GPLv3 license Awesome Badges

This repository includes a complete render engine with multiple graphics APIs, including the Khronos APIs OpenGL and Vulkan. It is currently in the construction phase aka. pre-alpha stage.

Installation

Dependencies

You must have the Vulkan SDK installed and added to your PATH environment variable on Windows and macOS systems for the installation process to work. CMake will not find Vulkan otherwise.

The project further depends on libraries like ASSIMP, GLFW, GLM, irrklang and IMGUI, which are installed through your systems package manager if possible or compiled with the project itself. They are mostly included in the repository as a submodule, making dependency management really easy. The project is thus fully cross-platform (at least amongst the platforms that support the API's)

Linux

The project comes with an install script for Linux systems. It offers support for Debian, Fedora and Arch/Manjaro. Download and run the installer:

git clone https://github.com/D3PSI/nautilus.git
cd nautilus/
sudo bash nautilus-install.sh

Windows

Generate the Visual Studio build files with CMake. Download and install the CMake GUI from their official website. Clone the repository and initialize all submodules by cloning the repository recursively:

git clone --recursive https://github.com/D3PSI/nautilus.git

Then generate the Visual Studio build files, either via the command line:

cmake -G "Visual Studio 16 2019" -S nautilus/ -B nautilus/build

or the GUI by specifying the project root directory as the source directory and the build/ folder in the project root directory as the output directory. Click configure and then generate. If there are any errors, make sure you have all the dependencies installed correctly.

Open the generated Visual Studio solution file in Microsoft Visual Studio, change the configuration to Release and the architexture to x64. You should now be able to build and run the examples which can be found in build/bin/.

macOS

For macOS you can also run the integrated installer from the repository after cloning, just like the Linux installation instructions say:

git clone https://github.com/D3PSI/nautilus.git
cd nautilus/
bash nautilus-install.sh

Getting started

The nautilus-project is a graphics, windowing, sound and physics library with focus to user simplicity. There are various different examples whose source can be found in the examples subdirectory of the repository. The library works on a basic concept: The NautilusCore object and attachable NautilusShell objects. To create a basic window with your favorite graphics API (OpenGL in the example) create a new derived class from the NautilusShellOpenGL (other possibilities include NautilusShellVulkan) object and override the required functions onAttach and onRender:

class ExampleShell 
    : public NautilusShellOpenGL {
    using NautilusShellOpenGL::NautilusShellOpenGL;
public:

    /**
     * Gets executed when the shell is attached to the core
     */
    void onAttach(void) {
        // statements to execute on attachment here
    }

    /**
     * Gets executed at the specified frequency to compute rendering operations
     */
    void onRender(void) {
        // OpenGL rendering statements here
    }

};

You can then instantiate a NautilusShell object from the class implementation you have just written and attach it with optional settings to the NautilusCore object:

NautilusShell*  shell;

/**
 * Initializes everything
 * @return Returns a nautilus::NautilusStatus status code
 */
nautilus::NautilusStatus run(void) {
    shell = new ExampleShell();

    shell->setShellContext(NAUTILUS_SHELL_CONTEXT_WINDOWED);
    shell->setShellTitle("Dev Example 1");
    shell->setShellExtent(1280, 720);
    shell->setShellIcon("res/images/icons/nautilus.png");
    NautilusCore::attachShell(shell);

    return nautilus::NAUTILUS_STATUS_OK;
}

The NautilusCore-object is implemented as a singleton, meaning there will only ever be one instance of the class which you never have to instantiate (you can just use the functions defined in the class straight-out-of-the-box):

/**
 * Main entry point for the application
 */
int main() {
    return run();;
}

You can create as many different shell objects and derived classes of it, as long as you always write the necessary function implementations. A NautilusShell object essentially represents a window containing a graphics context from the chosen graphics API.

Linking the library

To use the library in your own C++ project is really simple: The only file you have to manually include in your sourcecode is #include <nautilus/Nautilus.hpp>. Put the either self-compiled or pre-compiled binary library file (Windows: nautilus.lib, Linux: libnautilus.a) in the same folder as your CMakeLists.txt. In your CMakeLists.txt link against the nautilus library target and include the necessary include directories (the include-subfolder of the repository):

include_directories("path/to/include")
target_link_libraries(myProject nautilus)

Note

At the time of writing this guide, the nautilus-library is still a header-only capable library, meaning you do not have to link the binary library file to the project to make it work as long as you link to the nautilus-subfolder as the include directory instead of the dedicated include directory. The instructions are here for the potential future case of a non-header-only library.

Troubleshoot

In the worst case scenario, the compilation of the entire project takes about 20 to 30 minutes on a single thread (view continuous integration services for more information). To accelerate the process you can run the compilation on multiple threads:

make -j<number_of_threads>

where <number_of_threads> is at max the amount of supported threads of your CPU. This depends strongly on the manufacturer, whether hyperthreading is supported and other factors. Usually a good number to start is to just input the value 4 as this is supported on a wide variety of systems.

Popular Graphics Projects
Popular 3d Graphics Projects
Popular Graphics Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Plus Plus
3d Graphics
Cmake
Opengl
Graphics
Renderer
Vulkan
Graphics Programming
Graphics Engine
Graphics Library