If you have a ready-made application developed using OpenGL ES, and you thought about transferring it to the Windows Store, then I have good news for you. The Microsoft Open Technologies team has recently been working on adapting the
ANGLE project for the Windows Store and the Windows Phone Store. This means that the code based on OpenGL ES 2.0 that you have already written can be reused, and your Windows Store application can be released faster.
What is ANGLE.
Almost Native Graphics Layer Engine is a Google-developed OpenGL ES wrapper over DirectX 9-11. ANGLE is used as the main WebGL backend for Google Chrome and Mozilla Firefox on the Windows platform. Also, Chrome uses ANGLE for all render operations on Windows, including hardware acceleration of Canvas2D and support for graphical operations of the Native Client.
ANGLE for Windows Store applications
The main graphics API for Windows Store Apps and Windows Phone Store Apps is DirectX. This API is central to the platform, has become part of the operating system, and has worked well in many applications. But if you already have an application developed using OpenGL ES, then transferring it to DirectX will require obvious costs. In order to facilitate this task, the Microsoft Open Technologies team prepared
fork ANGLE (it is likely that it will soon become part of the main ANGLE branch) which allows you to save most of the OpenGL ES code on Windows RT and Windows Phone 8.0. Using this port, the
Cocos2D-X library has already been successfully migrated to Windows RT.
Where to start and some technical points
The source files of the fork are located at
https://github.com/stammen/angleproject . After downloading, open \ samples \ RotatingCube \ RotatingCube_winrt_2013.sln in Visual Studio 2013. This is an example from which all aspects of the organization of the infrastructure OpenGL applications for the Windows Store become clear.
The main entry point for WinRT is the Windows :: ApplicationModel :: Core :: IFrameworkView class, just like for DirectX applications. The RotatingCube :: Run () method is the main loop for processing messages and rendering.
The CubeRenderer class is the main class of work with graphics, it implements initialization methods (CreateResources ()) and displaying image frames on the screen (Update ()).
It should also be taken into account that Windows 8.0 and Windows Phone 8.0 do not have a shader compilation API during the execution of the application. It is necessary to prepare shaders in advance. There are no such restrictions in Windows 8.1, and you can use dynamic shaders.
If you do not have a general idea about the development for Windows Store, I highly recommend starting with studying the
application architecture and the
example application for DirectX .