This document summarizes a presentation about using C++11 to build 3D applications for desktop, web, and mobile. It discusses using C++11 features like closures and shared pointers. It also describes tools like Emscripten that allow compiling C++ to JavaScript for HTML5/WebGL deployment and ANGLE which maps OpenGL to DirectX for Windows apps. Key benefits highlighted are cross-platform support, native speeds, and compatibility with app stores. Some challenges mentioned are higher RAM usage for HTML5 apps and lack of Windows Phone support.
Vector Search -An Introduction in Oracle Database 23ai.pptx
Minko - Windows App Meetup Nov. 2013
1. #WindowsApps – Nov. 2013
Build 3D web and desktop applications with C++11
Jean-Marc Le Roux
CEO and co-founder of Aerys
jeanmarc@aerys.in
@promethe42
5. Focus on design. Boost with code.
Minko « Studio » Edition
Designers integrate 3D content, customize materials, setup lights and animations.
Developers plug in scripts and interactivity.
6. The sky is the limit.
Minko « Community » Edition
Build desktop, web and mobile 3D applications with
Minko’s free and open source SDK including
a fully-featured 3D engine and plugins.
8. « We chose Minko to be the 3D engine in one of our new Flash-based
games because we think it’s a highly professional solution in terms of
development ecosystem and high performance. »
André Weissflog, Head of Development at BigPoint
9. Features
100% compatible with Windows, Mac,
Linux, iOS, Android and WebGL
WYSIWYG Scene editor
3D scene graph API
80+ 2D/3D file formats supported
Dynamic assets loading
Über-shaders
Components & scripts system
3D compression, simplification and
streaming
Physics (Bullet)
Plugin system (Oculus, Leap, ….)
Data-driven rendering engine
Particles engine
10. Why?
3D apps are usually bigger/more complex projects
Bigger teams
Bigger expectations
Complex assets workflow
C++ is more expressive and brings some specific optimizations
Static typing, templates
Inlining
Low level memory management (no GC)
…
C++ can be used on any platforms (Windows, Mac, Linux, iOS, Android, Flash, Windows
Phone…)
« Anything that can be done with JavaScript will be done in Javascript »
Well anything that can be done has already been done in C++ so…
12. C++ 2011
Standard, fast, well documented and supported by a vast community
Already fully supported by all major compilers (VS, GCC, LLVM…)
New additions make it closer to what we’re used to with Javascript
– Closures/lambda functions
– Type inference (instead of dynamic typing)
– Shared pointers (instead of GC)
13. C++11 Example – Closures
// callback is removed when mouseWheel is set to nullptr
15. Emscripten https://github.com/kripken/emscripten
Open source project driven by Mozilla
– Based on LLVM, which is supported by Google, Apple, Intel and many more
Cross-compile C++ code to Javascript code
– Binds OpenGL to WebGL
– Provide virtual file system
– C++ Javascript bindings
Code optimizations
– LLVM and C++ specific optimizations
– Closure compiler
– asm.js (2x performances of native code!)
Code compression using LZMA
19. ANGLE https://code.google.com/p/angleproject/
Almost Native Graphics Layer Engine
Open source project driven by Google
– Used by Chrome and Firefox WebGL implementations
OpenGL wrapper that will map OGL calls to the DirectX API
– Provide better performances on Windows
– Makes it possible to target DirectX with an OpenGL based implementation
– Should provide Windows Phone 8 compatibility out of the box
Also converts GLSL shaders to HLSL
– Completely transparent to the developer!
– Write once, deploy everywhere
Supports DirectX 11
– Compatible with the Windows 8.1 App Store
21. My Feedback – The Good Parts
Working with C++ 2011 is amazing
More complex but so much powerful/expressive than AS3/JS
Useful and reliable STL containers (list, maps, sets, etc…)
Shared pointers make memory management just as easy as with managed
languages: not a single memory leak so far!
Visual Studio/XCode are very good IDEs
Minko 3’s implementation is much lighter and yet just as much
powerful
Vagrant + Premake provides an efficient build system with crosscompilation
22. My Feedback – The Good Parts
Compatibility
The app runs on Windows, Mac, Linux, iOS, Android and WebGL
withouth a single modification!
Haven’t tested iOS/Android yet, but should work out of the box
Speed
Native speed on Windows, Mac, Linux, iOS and Android
2x speed of native code in HTML5/WebGL thanks to asm.js!
Target DirectX 11 thanks to ANGLE
Direct push on the Windows 8.1 App Store
23. My Feedback – The Bad Parts
RAM consumption for HTML5/WebGL apps x-compiled
with emscripten
Will likely improve with every new release
Not yet compatible with the Windows Phone 8 App Store
Forbidden to use the « online » HLSL compiler for mobile apps