why use ANGLE for a cross-platform game?

2,637 views
Skip to first unread message

pem....@gmail.com

unread,
Sep 17, 2015, 2:21:51 AM9/17/15
to angleproject
Why should I use ANGLE?  I saw that ANGLE is used by Chrome and FireFox to run WebGL...  But why should I use ANGLE for my own project such as a cross-platform game or other 3d application?

For Windows desktop, you can already use OpenGL ES 2 & 3 on Windows without ANGLE if the host has (OpenGL 4.1 with GL_ARB_ES2_compatibility) or (OpenGL 4.3 provides full compatibility with OpenGL ES 3.0).  So I could still use the same OpenGL ES 2 (or 3) code on Windows desktop with desktop OpenGL as I use for Android and iOS etc.

* You do not want your user to have to install a recent graphics card driver [eg from AMD, NVIDIA, Intel]
* Your application needs to run over Windows Remote Desktop Protocol

For Windows desktop, assuming these are the only two significant reasons, then maybe what my game should do is the following?  Use desktop OpenGL by default.  If I detect lack of support for GL_ARB_ES2_compatibility (or GL_ARB_ES3_compatibility), then fallback to ANGLE.  If I detect the user is running RDP (how?), then fallback to ANGLE.  Under preferences, allow the user to choose ANGLE (the option will say "use ANGLE if you want to run over Windows Remote Desktop Protocol").

Are there any other reasons to use ANGLE for Windows desktop?

And what about for Windows 10 Universal Platform with OpenGL ES?  Windows 10 Mobile?  XBox 360?  Raspberry Pi 2?  Windows Internet of Things (IoT)?  Do any of these require ANGLE for OpenGL ES 2 (or 3)?  Maybe that's the real reason to use ANGLE?  Does ANGLE (or any OpenGL) even work on XBox 360?  Is ANGLE the only way to use OpenGL for Windows 10 Mobile?


I see "ANGLE for Windows Store" here ( https://www.nuget.org/packages/ANGLE.WindowsStore/ ).  Should I be using that instead of ( https://code.google.com/p/angleproject/ )?

Shannon Woods

unread,
Sep 17, 2015, 10:59:52 AM9/17/15
to angleproject


On Thursday, September 17, 2015 at 2:21:51 AM UTC-4, pem.list wrote:
Why should I use ANGLE?  I saw that ANGLE is used by Chrome and FireFox to run WebGL...  But why should I use ANGLE for my own project such as a cross-platform game or other 3d application?

For Windows desktop, you can already use OpenGL ES 2 & 3 on Windows without ANGLE if the host has (OpenGL 4.1 with GL_ARB_ES2_compatibility) or (OpenGL 4.3 provides full compatibility with OpenGL ES 3.0).  So I could still use the same OpenGL ES 2 (or 3) code on Windows desktop with desktop OpenGL as I use for Android and iOS etc.

* You do not want your user to have to install a recent graphics card driver [eg from AMD, NVIDIA, Intel]
* Your application needs to run over Windows Remote Desktop Protocol

For Windows desktop, assuming these are the only two significant reasons, then maybe what my game should do is the following?  Use desktop OpenGL by default.  If I detect lack of support for GL_ARB_ES2_compatibility (or GL_ARB_ES3_compatibility), then fallback to ANGLE.  If I detect the user is running RDP (how?), then fallback to ANGLE.  Under preferences, allow the user to choose ANGLE (the option will say "use ANGLE if you want to run over Windows Remote Desktop Protocol").

Are there any other reasons to use ANGLE for Windows desktop?

It's worth noting that ANGLE has added its own desktop OpenGL backend, so you should be able to do both of these within ANGLE, including on drivers which do not support the compatibility extensions, and cleanly fall back to the D3D renderers if needed. This is a recent addition, and hasn't seen widespread deployment yet, so if you do choose to try it out, we'd welcome feedback and bug reports. Additionally, we're currently adding support for Linux and MacOS.

Whether ANGLE is the right choice for a particular project is a decision the project has to make for itself, but some of the questions you should think about are:
- Do you need to support users with older hardware, or drivers that are no longer being updated by the GPU vendor?
- How much does the project rely on uniform behavior and validation? One of the reasons ANGLE was created was to reduce issues with driver bugs & divergent behavior requiring workarounds.
 

And what about for Windows 10 Universal Platform with OpenGL ES?  Windows 10 Mobile?  XBox 360?  Raspberry Pi 2?  Windows Internet of Things (IoT)?  Do any of these require ANGLE for OpenGL ES 2 (or 3)?  Maybe that's the real reason to use ANGLE?  Does ANGLE (or any OpenGL) even work on XBox 360?  Is ANGLE the only way to use OpenGL for Windows 10 Mobile?


I see "ANGLE for Windows Store" here ( https://www.nuget.org/packages/ANGLE.WindowsStore/ ).  Should I be using that instead of ( https://code.google.com/p/angleproject/ )?

ANGLE does not have an XBox 360 support path (unless someone has added support on a fork somewhere that I'm not aware of).
The nuget package & MSOpenTech fork are maintained by Microsoft . They upstream much of the work to support WinRT/Windows Store applications into the main project, but things like the Visual Studio templates will be found only in the MSOpenTech repository and nuget package. If you're interested specifically in creating an OpenGL ES app for Windows Phone or similar, you may want to use those instead of main ANGLE. (The folks who maintain the fork & upstream contributions hang out on this forum as well, so they may also have some useful advice.)


Austin Kinross

unread,
Sep 17, 2015, 11:02:43 AM9/17/15
to angleproject
Yes, ANGLE is a great way to run OpenGL ES content in a Universal Windows Platform (UWP) app on Windows 10. The UWP doesn't support "desktop" OpenGL since some versions of Windows 10 don't include any OpenGL support (e.g. Windows Mobile or IoT). You can read more about device support for UWP here: https://msdn.microsoft.com/en-us/library/windows/apps/dn894631.aspx

The "ANGLE for Windows Store" NuGet package is a convenient way to use ANGLE in a UWP application (or even a Windows Store application for 8.1). If you use it then you don't have to clone/generate/compile or package ANGLE yourself. If you prefer to compile ANGLE from source then feel free to do so!

Note that the "ANGLE for Windows Store" NuGet package uses the MSOpenTech version of ANGLE (https://github.com/MSOpenTech/angle). This is a fork of https://code.google.com/p/angleproject/ which includes a couple of performance improvements (particularly for Mobile devices) which haven't been submitted to the master branch of ANGLE yet for various reasons.

Hope this helps,
Austin (Microsoft Corp)

Ariel Manzur

unread,
Sep 18, 2015, 10:25:13 AM9/18/15
to Austin Kinross, angleproject
We're using it (on Godot Engine) for Windows Phone/UWP support, and
we'd like to put it on the normal windows build to support older
hardware more easily.

On a related question, can the MSOpenTech version compile windows
desktop and windows UWP versions out of the same source? Is there any
documentation on what flags/files need to be turned on/off for each
version? I'd like to add it to our source tree and our compile scripts
(we use scons), ideally it'd be a static link, to avoid requiring
users to distribute extra dlls.

Thanks,

Ariel.
> --
> You received this message because you are subscribed to the Google Groups
> "angleproject" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angleproject...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Shawn Hargreaves

unread,
Sep 18, 2015, 12:44:22 PM9/18/15
to pun...@gmail.com, Austin Kinross, angleproject
The code at https://github.com/MSOpenTech/angle can be compiled for desktop, UWP, and Windows or Phone 8.1 Store from the same source, but the "ANGLE for Windows Store" NuGet package only includes binaries for UWP and 8.1 Store apps (not desktop).

You'll need to build your own binaries to target desktop. The "Quick Start" section of https://github.com/MSOpenTech/angle explains which .sln to use for each target platform.

pem....@gmail.com

unread,
Sep 18, 2015, 9:28:45 PM9/18/15
to angleproject
Why would you want to target desktop?  Doesn't UWP include desktop support?

best regards

Ariel Manzur

unread,
Sep 19, 2015, 11:28:04 AM9/19/15
to pem....@gmail.com, angleproject
As far as I understand, UWP is for Windows 10 on desktops, and for the
"metro style" app (basically like a tablet or phone app, although I'm
sure the folks from Microsoft will tell us they're very versatile and
the future of computing, etc ;-). The desktop is for "normal" windows
users, Windows 7, Steam games, etc. The "old style" windows
application. I'm not sure you can put a UWP game on Steam..

On 19 September 2015 at 03:28, <pem....@gmail.com> wrote:
> Why would you want to target desktop? Doesn't UWP include desktop support?
>
> best regards
>

pem....@gmail.com

unread,
Sep 20, 2015, 2:14:22 AM9/20/15
to angleproject, pem....@gmail.com
Interesting...  I'm using cmake and so far I've just built my (C++, OpenGL ES 2.0, SDL2) program with a reference to "angleproject\lib\Release\libGLESv2.dll".  I suppose this is the "normal" desktop Windows application.

Aside - I've also built my project for Linux, OS X, iOS, Android, and Emscripten.  But in terms of Windows, I've only built a normal desktop Windows application using "angleproject\lib\Release\libGLESv2.dll".

In addition to this, it sounds like I need to figure out how to build ANGLE for UWP, and then create a separate cmake build of my project for UWP that references the ANGLE libGLESv2.dll built for UWP?

So in the end I'll have two Windows ANGLE builds of libGLESv2.dll (one for desktop Windows and one for UWP).  And I'll have two builds of my project (one for desktop Windows and one for UWP).

pem....@gmail.com

unread,
Sep 20, 2015, 2:17:18 AM9/20/15
to angleproject, pem....@gmail.com
@shawnhar: it's interesting that the NuGet package only contains binaries for (UWP and 8.1 Store apps) but not desktop.  However the standard Google ANGLE project contains libGLESv2.dll binaries for desktop.  So you actually don't have to compile anything...  You could just use the Google ANGLE binaries for Windows desktop, and use the Microsoft NuGet ANGLE binaries for (UWP & 8.1 Store) (or in my case just UWP).  Right?
Reply all
Reply to author
Forward
0 new messages