openframeworks 0.12. addon for Ultralight, an ultra-portable web-browser engine.
See https://ultralig.ht for licensing and more.
Ultralight (C) 2024 Ultralight, Inc.
Ultralight is a trademark of Ultralight, Inc.
Based on ultralight-sdk-1.4-win https://ultralig.ht/. See the branches for version for earlier versions.
With the release of the most inspiring Ultralight 1.2, implementation of Ultralight in other Apps has become much easier. So I wrote this addon from scratch. This is only a beginning and at the moment mostly for my usecase:
- Heavily layouted One-Page content, that can be changed easily without having to adjust my OF App
- Simple GUI functionality (communication with the OF App, which has the power to do the advanced stuff)
My focus is not on perfect code but on ease of use and integration. Of course the addon can be adjusted and developed. I am happy if it will be an all-purpose Browser addon one day. Join in, everybody. Also: I am not a C++ developer. I am more than happy to learn and improve the code!
- For now only CPU rendering, although optimized by using a Custom Surface now. Full GPU implementation ist yet to come. (Please check out IanByuns work for a working GPU solution. Or fork this repo and help me getting it to work...)
- Basic loading of URLs, Files and raw HTML.
- Mouse klick and scroll wheel implementation.
- Basic keyboard implementation.
- High-level (easy to understand and use) code in your App.
- Communication OF->Ultralight and Ultralight->OF.
- UL log goes to Terminal via OF Logging, same for Console Messages.
- Only Windows and Linux for now. Linux Version see branch linux-1.4, Windows Version see branch main.
- example-basic-CPU shows how to use in general.
- example-communication-GUI shows how to do communication between Broser (JS) and OF, both directions.
-
clone this repository to addons folder using git (OR download, unzip, copy and remove the "-master" part in folder name)
-
Use project generator, include addon ofxUltralight, create the project.
-
Open it in Visual Studio 2019 (we need Platform Toolset v42 for Ultralight, so no VS 2017, sorry. But you can install them side by side.)
-
in case it is not done automatically on opening: retarget solution (right Mouseclick on your solution in solution explorer)
-
Set it to x64 (Win32 will fail) and build
- clone this repository to addons folder using git (OR download, unzip, copy and remove the "-master" part in folder name)
- Add "ofxUltralight" to addons.make (OR use the Project Generator to add this addon)
- go to your projects folder and type "make"
- add the files from folder addons/ofxUltralight/bin to the bin folder of your project
I am very happy! It works. Don't expect too much already, but come back from time to time, as it will grow.
oe