All Projects → miho → NativeFX

miho / NativeFX

Licence: Apache-2.0 license
Native Rendering integration for JavaFX (13 and beyond)

Programming Languages

C++
36643 projects - #6 most used programming language
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to NativeFX

tqrespec
TQRespec - The respec tool for Titan Quest game
Stars: ✭ 59 (-52.8%)
Mutual labels:  javafx
mano-simulator
🖥️ An assembler and hardware simulator for the Mano Basic Computer, a 16 bit computer.
Stars: ✭ 20 (-84%)
Mutual labels:  javafx
Desktop-Applications-JavaFX
JavaFX Open Source Projects
Stars: ✭ 69 (-44.8%)
Mutual labels:  javafx
scraper
A simple web scraper built around the JavaFX WebEngine
Stars: ✭ 13 (-89.6%)
Mutual labels:  javafx
3-D-Scene-Graph
3D scene graph generator implemented in Pytorch.
Stars: ✭ 52 (-58.4%)
Mutual labels:  scene-graph
CatLearnQt
CatLearnQt,提供QWidget,Quick,网络,串口,基础库和示例。案例软件支持样式切换,与国际化。
Stars: ✭ 63 (-49.6%)
Mutual labels:  qt5
lxqt-archiver
A simple & lightweight desktop-agnostic Qt file archiver
Stars: ✭ 23 (-81.6%)
Mutual labels:  qt5
FXTools
My JavaFX resources, libraries & ready tools (GUI) using in JavaFX projects.
Stars: ✭ 37 (-70.4%)
Mutual labels:  javafx
StockManager
a JavaFX stock manager app
Stars: ✭ 29 (-76.8%)
Mutual labels:  javafx
LR-Parser
LR Parser (LR(0), SLR(1), CLR(1) and LALR(1))
Stars: ✭ 40 (-68%)
Mutual labels:  javafx
uDevkit-IDE
An IDE for uDevkit or C/C++ projects with Git written in Qt5
Stars: ✭ 15 (-88%)
Mutual labels:  qt5
qt-google-analytics
Qt5 classes for providing Google analytics usage in a Qt/QtQuick application
Stars: ✭ 51 (-59.2%)
Mutual labels:  qt5
meta-qt5-extra
OE layer for desktop environments based on Qt5 (KDE KF5+Plasma+Apps / lirios / lxqt / lumina)
Stars: ✭ 28 (-77.6%)
Mutual labels:  qt5
PremiereSubtitle
🎬Premiere subtitles generator | Pr 字幕批量生成器
Stars: ✭ 21 (-83.2%)
Mutual labels:  qt5
qtprotobuf
Protobuf generator and bindings for Qt framework
Stars: ✭ 138 (+10.4%)
Mutual labels:  qt5
Brutal-wordlist-Generator
Brutal Wordlist Generator is a java based Application software used to generate the wordlist with best of UX interface
Stars: ✭ 24 (-80.8%)
Mutual labels:  javafx
qt5-kobo-platform-plugin
A Qt5 platform backend plugin for Kobo E-Ink devices.
Stars: ✭ 19 (-84.8%)
Mutual labels:  qt5
VickyWarAnalyzer
Victoria II war analyzer. Java 8 + JavaFX + Maven
Stars: ✭ 43 (-65.6%)
Mutual labels:  javafx
dde-istate-menus
a dde-dock plugin which aims to implement most features of Istat menus(macOS) for Deepin V20
Stars: ✭ 30 (-76%)
Mutual labels:  qt5
EEIoT
QML IoT components, for fast and super user friendly IoT projects
Stars: ✭ 38 (-69.6%)
Mutual labels:  qt5

NativeFX (WIP)

Build Status


Native Rendering integration for JavaFX (13 and beyond)

Why?

NativeFX adds native rendering support to the JavaFX scene graph. It uses Boost IPC to share memory among multiple processes. In contrast to other solutions it runs with the official APIs. No workarounds necessary. And since the native rendering is done in a seperate process it won't crash your JVM if something goes wrong. That's ideal if you are interesed in a robust solution.

Why should you use it? Ever wanted to integrate native applications into the scene graph? Maybe you want to add OpenGL support, a Qt application or Blink/WebKit. All of this will be possible with NativeFX!

WIP

Got curious? This project is still WIP. But it comes with a sample server that shows how to use it. We run it on Linux, macOS and Windows (on x64). There's a good chance it will work for you as well. If not, create an issue and let us know!

Many features are still missing. But this project is already compatible with JDK13 and JavaFX 13.

Performance

There have been efforts to do this before. Why should this approach be any better?

Good question! We started with a direct buffer and used the PixelWriter interface to update a WritableImage that displays the content. With JavaFX 13 we added support for the new PixelBuffer API. Early tests show that we can expect a performance boost of around 50%. For our use cases this is a game changer!

If you are willing to use internal APIs you can try DriftFX. Which will work with direct texture sharing instead of slow CPU based buffers. NativeFX is a more conservative approach.

Building NativeFX

Requirements

  • Java >= 11
  • C++11 compliant compiler (GCC, Clang, Visual Studio 2017-19)
  • CMake >= 3.9
  • Internet connection (dependencies are downloaded automatically)
  • IDE: Gradle Plugin (not necessary for command line usage)

IDE

Open the NativeFX Gradle project in your favourite IDE (tested with VSCode) and build it by calling following tasks clean assemble.

Command Line

Navigate to the NativeFX Gradle project (i.e., path/to/NativeFX/) and enter the following command

Bash (Linux/macOS/Cygwin/other Unix shell)

bash gradlew clean assemble

Windows (CMD)

gradlew clean assemble

On Windows, make sure the environment is configured for development (MSBuild.exe must be on the path).

Testing NativeFX

Step 1 (compile and run the sample-server)

To compile and run the sample-server, do the following (relative to the previous project folder):

Bash (Linux/macOS/Cygwin/other Unix shell)

cd sample-servers/sample-server/
mkdir build
cd build
cmake ..
make
./sample-server -n _mem_1

Windows (CMD)

cd sample-servers/sample-server/
mkdir build
cd build
cmake .. -DCMAKE_GENERATOR_PLATFORM=x64
MSBuild.exe sample-server.sln /property:Configuration=Release /property:Platform=x64
Release\x64\sample-server.exe -n _mem_1

If the last command doesn't work, then check whether the executable is located in Release\sample-server.exe without x64.

Step 2 (run the sample JavaFX application)

Navigate back to the NativeFX project folder (i.e., path/to/NativeFX/) and do the following:

Bash (Linux/macOS/Cygwin/other Unix shell)

bash gradlew run

Windows (CMD)

gradlew run

Now, click the Connect button.

That's it!

Testing the Qt sample server:

Requirements

  • Qt 5.x (tested with 5.12 and 5.13.1)
  • Internet connection

Step 1 (compile and run the sample-server)

Make sure Qt is installed properly (libs must be on the PATH). To compile and run the sample-server, do the following (relative to the previous project folder):

Bash (Linux/macOS/Cygwin/other Unix shell)

cd sample-servers/nativefx-qt/
mkdir build
cd build
cmake ..
make
./nativefx-qt -n _mem_1

Windows (CMD)

cd sample-servers/nativefx-qt/
mkdir build
cd build
cmake .. -DCMAKE_GENERATOR_PLATFORM=x64
MSBuild.exe nativefx-qt.sln /property:Configuration=Release /property:Platform=x64
Release\nativefx-qt.exe -n _mem_1

If Qt5 cannot be found, let CMake know where to search for Qt, e.g.,

cmake .. -DCMAKE_GENERATOR_PLATFORM=x64 -DQt5_DIR=C:\Qt\5.13.1\msvc2017_64\lib\cmake\Qt5\

Hint: Qt5_Dir has to point to a directory containing 'Qt5Config.cmake' or 'qt5-config.cmake'.

If the last command doesn't work, then check whether the executable is located in Release\nativefx-qt.exe without x64.

Step 2 (run the sample JavaFX application)

Navigate back to the NativeFX project folder (i.e., path/to/NativeFX/) and do the following:

Bash (Linux/macOS/Cygwin/other Unix shell)

bash gradlew run

Windows (CMD)

gradlew run

Now, click the Connect button.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].