microsoft / angle

ANGLE: OpenGL ES to DirectX translation
Other
615 stars 166 forks source link

Visual Studio compatibilities #115

Closed rimariot closed 7 years ago

rimariot commented 7 years ago

When ANGLE support for Visual Studio 2017?

austinkinross commented 7 years ago

Hi, are you looking to build ANGLE with Visual Studio 2017, or consume the NuGet package?

We haven't tried using ANGLE with VS2017 yet. If you're seeing any specific problems then please feel free to share details.

Thanks, Austin

therealkenc commented 7 years ago

ANGLE builds great on VS 2017 RTM and SDK 10.0.14393. Pretty impressive how painlessly, actually. All the samples compile except texture_loading_dds:

1>------ Build started: Project: texture_loading_dds, Configuration: Debug x64 ------
1>TextureLoadingDDS.cpp
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um\combaseapi.h(429): error C2143: syntax error: missing ',' before '*'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um\combaseapi.h(444): error C2143: syntax error: missing ',' before '*'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um\combaseapi.h(451): error C2143: syntax error: missing ',' before '*'
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um\combaseapi.h(655): error C2143: syntax error: missing ',' before '*'
[...etc etc]

Just so it's handy, the combaseapi.h declaration for the first C2143 is:

422 #pragma region Desktop or OneCore Family
423 
424 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
425 
426 _Check_return_ WINOLEAPI
427 CoGetMalloc(
428     _In_ DWORD dwMemContext,
429     _Outptr_ LPMALLOC FAR * ppMalloc
430    );
431
432
433 #endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
434 #pragma endregion
rimariot commented 7 years ago

Thank you for information. I'd like to consume ANGLE in VS2017 with NuGet package. When will it be available?

therealkenc commented 7 years ago

For what it is worth, this was committed literally just yesterday. I assume it will flow in good time to Google's stable branch, and then upstream.

https://chromium.googlesource.com/angle/angle.git/+/c1ebf5bdaadc3cd1ff51a9a8b3ba611372bfa453

austinkinross commented 7 years ago

@rimariot, we haven't tried the ANGLE NuGet package with VS2017 yet but we expect it to work without any changes. Are you seeing specific problems? If so, could you share details please?

Thanks!

jarbot commented 7 years ago

I tried building the template from source for VS2017 using these instructions. I modified the bat file to put the templates in the right place for VS2017.

The new templates show up in the new project dialog in VS, but it fails to create the project. The error message is not useful "project template failed" or something similar.

I added the nuget libs to a black C++ UWP template and tried to load a texture as explained here but I get errors stating that "identifier "glGenTextures" is undefined" and other gl functions are undefined. I included the necessary libs ( as far as I know):

`#include <EGL\egl.h>

include <GLES2\gl2.h>

include <GLES2\gl2ext.h>

include "WICTextureLoader.h"`

note: I'm not a C++ OpenGL dev, just messing around trying to create a new target for Haxe/OpenFL

austinkinross commented 7 years ago

Hi jarbot, thanks for reporting the issue! Do you know which version of the Windows SDK you have installed?

This may be related to the SDK version that the templates target. If, for example, you have SDK version 14393 installed then updating these files:

https://github.com/Microsoft/angle/blob/ms-master/templates/10/Windows/Universal/XamlUniversal/XamlApp.vcxproj https://github.com/Microsoft/angle/blob/ms-master/templates/10/Windows/Universal/CoreWindowUniversal/WindowsUniversalApp.vcxproj

from

<WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>

to

<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion
<WindowsTargetPlatformMinVersion>10.0.14393.0</WindowsTargetPlatformMinVersion>

may fix the issue for you. We'll try to push a complete fix for this to our repository soon.

Thanks! Austin

austinkinross commented 7 years ago

The templates have been updated to work with the latest Windows SDKs. Please feel free to open another GitHub issue if you see any other problems with recent Windows SDKs or versions of Visual Studio.

Thanks!