Hi,
I’m working on a game engine called Solarus used for Snes Zelda-like games, and I’ve just recently added DirectX support on top of XAML, right now because of threading issues, there must be two functions, one to init SDL and the other one the SDL game loop.
I don’t know how to submit this or if it’s a good patch to have.
This is the way it works:
/*
Simple DirectMedia Layer
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
This file has been truncated. show original
/*
SDL_winrt_main_NonXAML.cpp, placed in the public domain by David Ludwig 3/13/14
*/
#include "SDL_main.h"
#include <wrl.h>
/* At least one file in any SDL/WinRT app appears to require compilation
with C++/CX, otherwise a Windows Metadata file won't get created, and
an APPX0702 build error can appear shortly after linking.
The following set of preprocessor code forces this file to be compiled
as C++/CX, which appears to cause Visual C++ 2012's build tools to
create this .winmd file, and will help allow builds of SDL/WinRT apps
to proceed without error.
If other files in an app's project enable C++/CX compilation, then it might
be possible for SDL_winrt_main_NonXAML.cpp to be compiled without /ZW,
for Visual C++'s build tools to create a winmd file, and for the app to
build without APPX0702 errors. In this case, if
This file has been truncated. show original
Right now I’m looking towards using Angle and OpenGL with XAML, do you have any progress on this?
Thanks!