In search of Cross Platform Library

Tuesday, October 08, 2013
By keiji
Past two months or so, I've been looking for a cross platform library that meets following criteria:
  1. Supports iOS, Android, OSX, Windows Desktop, Windows Store App, (optional Linux)
  2. Use C/C++ as a primary language, and compile to native binary
  3. Supports WebView for a UI (WebView need to support transparent background)
  4. Use Open GL 2 ES or Direct X 11 for 3D graphics
  5. Supports 2D graphics, including text drawing

In reality, I couldn't find any that can handle all of above.

So, I decided to create one by myself.
After some research, I made a plan to use following libraries to do so.

  • Windows Desktop
  • Windows Store App
    • Direct X11.1
    • Direct 2D 1.1/DirectWrite
    • XAML WebView (Windows 8.1 or later support transparent background)
    • C/C++11
  • OS/X
    • Open GL 3
    • Quartz 2D
    • NSWebView
    • C/C++11/Objective-C++
  • iOS
    • Open GL ES 2
    • Quartz 2D
    • WebView
    • C/C++11/Objective-C++
  • Android
    • Open GL ES 2
    • Skia for 2D graphics
    • WebView
    • NDK - C/C++11

So far, iOS, OS/X both works well with OpenGL using shaders. All of their WebView support the transparent background.
Android Lacks 2D graphics, but Skia works well.
Windows Store App finally support transparent background of its WebView with Windows 8.1. It requires the latest, but I don't it is an issue as it is new anyway.
Windows Desktop has no "WebView" with transparent background (IE component won't work)
I managed to run their sample program Chromium Embedded Framework (CEF) , so hopefully it works.

Combining DirectX11 with Direct2D is tricky too - there is mixed information on Internet and hard to find "correct" information right now (well, it took a while to figure it out anyway) but following articles helps:
Introducing Direct2D 1.1
Direct2D 1.1 Migration Guide for Windows 7 Developers



Reply to

(Max 1000 chars)
Confirmation Key:
Please enter the value displayed in the image.
Send Send