updated cpp template files for Windows 8.1 Universal App

This commit is contained in:
Dale Stammen 2015-06-03 09:25:50 -07:00
parent f778b02aa0
commit 6f2c7574bf
4 changed files with 132 additions and 81 deletions

View File

@ -51,10 +51,11 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) :
mRenderSurface(EGL_NO_SURFACE), mRenderSurface(EGL_NO_SURFACE),
mCustomRenderSurfaceSize(0,0), mCustomRenderSurfaceSize(0,0),
mUseCustomRenderSurfaceSize(false), mUseCustomRenderSurfaceSize(false),
m_coreInput(nullptr), mCoreInput(nullptr),
m_dpi(0.0f), mDpi(0.0f),
m_deviceLost(false), mDeviceLost(false),
m_orientation(DisplayOrientations::Landscape) mVisible(false),
mOrientation(DisplayOrientations::Landscape)
{ {
InitializeComponent(); InitializeComponent();
@ -77,7 +78,7 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) :
currentDisplayInformation->OrientationChanged += currentDisplayInformation->OrientationChanged +=
ref new TypedEventHandler<DisplayInformation^, Object^>(this, &OpenGLESPage::OnOrientationChanged); ref new TypedEventHandler<DisplayInformation^, Object^>(this, &OpenGLESPage::OnOrientationChanged);
m_orientation = currentDisplayInformation->CurrentOrientation; mOrientation = currentDisplayInformation->CurrentOrientation;
this->Loaded += this->Loaded +=
ref new Windows::UI::Xaml::RoutedEventHandler(this, &OpenGLESPage::OnPageLoaded); ref new Windows::UI::Xaml::RoutedEventHandler(this, &OpenGLESPage::OnPageLoaded);
@ -111,23 +112,23 @@ OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) :
auto workItemHandler = ref new WorkItemHandler([this](IAsyncAction ^) auto workItemHandler = ref new WorkItemHandler([this](IAsyncAction ^)
{ {
// The CoreIndependentInputSource will raise pointer events for the specified device types on whichever thread it's created on. // The CoreIndependentInputSource will raise pointer events for the specified device types on whichever thread it's created on.
m_coreInput = swapChainPanel->CreateCoreIndependentInputSource( mCoreInput = swapChainPanel->CreateCoreIndependentInputSource(
Windows::UI::Core::CoreInputDeviceTypes::Mouse | Windows::UI::Core::CoreInputDeviceTypes::Mouse |
Windows::UI::Core::CoreInputDeviceTypes::Touch | Windows::UI::Core::CoreInputDeviceTypes::Touch |
Windows::UI::Core::CoreInputDeviceTypes::Pen Windows::UI::Core::CoreInputDeviceTypes::Pen
); );
// Register for pointer events, which will be raised on the background thread. // Register for pointer events, which will be raised on the background thread.
m_coreInput->PointerPressed += ref new TypedEventHandler<Object^, PointerEventArgs^>(this, &OpenGLESPage::OnPointerPressed); mCoreInput->PointerPressed += ref new TypedEventHandler<Object^, PointerEventArgs^>(this, &OpenGLESPage::OnPointerPressed);
m_coreInput->PointerMoved += ref new TypedEventHandler<Object^, PointerEventArgs^>(this, &OpenGLESPage::OnPointerMoved); mCoreInput->PointerMoved += ref new TypedEventHandler<Object^, PointerEventArgs^>(this, &OpenGLESPage::OnPointerMoved);
m_coreInput->PointerReleased += ref new TypedEventHandler<Object^, PointerEventArgs^>(this, &OpenGLESPage::OnPointerReleased); mCoreInput->PointerReleased += ref new TypedEventHandler<Object^, PointerEventArgs^>(this, &OpenGLESPage::OnPointerReleased);
// Begin processing input messages as they're delivered. // Begin processing input messages as they're delivered.
m_coreInput->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessUntilQuit); mCoreInput->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessUntilQuit);
}); });
// Run task on a dedicated high priority background thread. // Run task on a dedicated high priority background thread.
m_inputLoopWorker = ThreadPool::RunAsync(workItemHandler, WorkItemPriority::High, WorkItemOptions::TimeSliced); mInputLoopWorker = ThreadPool::RunAsync(workItemHandler, WorkItemPriority::High, WorkItemOptions::TimeSliced);
} }
OpenGLESPage::~OpenGLESPage() OpenGLESPage::~OpenGLESPage()
@ -141,29 +142,30 @@ void OpenGLESPage::OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::Rou
// The SwapChainPanel has been created and arranged in the page layout, so EGL can be initialized. // The SwapChainPanel has been created and arranged in the page layout, so EGL can be initialized.
CreateRenderSurface(); CreateRenderSurface();
StartRenderLoop(); StartRenderLoop();
mVisible = true;
} }
void OpenGLESPage::OnPointerPressed(Object^ sender, PointerEventArgs^ e) void OpenGLESPage::OnPointerPressed(Object^ sender, PointerEventArgs^ e)
{ {
if (m_renderer) if (mRenderer)
{ {
m_renderer->QueuePointerEvent(PointerEventType::PointerPressed, e); mRenderer->QueuePointerEvent(PointerEventType::PointerPressed, e);
} }
} }
void OpenGLESPage::OnPointerMoved(Object^ sender, PointerEventArgs^ e) void OpenGLESPage::OnPointerMoved(Object^ sender, PointerEventArgs^ e)
{ {
if (m_renderer) if (mRenderer)
{ {
m_renderer->QueuePointerEvent(PointerEventType::PointerMoved, e); mRenderer->QueuePointerEvent(PointerEventType::PointerMoved, e);
} }
} }
void OpenGLESPage::OnPointerReleased(Object^ sender, PointerEventArgs^ e) void OpenGLESPage::OnPointerReleased(Object^ sender, PointerEventArgs^ e)
{ {
if (m_renderer) if (mRenderer)
{ {
m_renderer->QueuePointerEvent(PointerEventType::PointerReleased, e); mRenderer->QueuePointerEvent(PointerEventType::PointerReleased, e);
} }
} }
@ -172,9 +174,9 @@ void OpenGLESPage::OnKeyPressed(CoreWindow^ sender, KeyEventArgs^ e)
if (!e->KeyStatus.WasKeyDown) if (!e->KeyStatus.WasKeyDown)
{ {
//log("OpenGLESPage::OnKeyPressed %d", e->VirtualKey); //log("OpenGLESPage::OnKeyPressed %d", e->VirtualKey);
if (m_renderer) if (mRenderer)
{ {
m_renderer->QueueKeyboardEvent(WinRTKeyboardEventType::KeyPressed, e); mRenderer->QueueKeyboardEvent(WinRTKeyboardEventType::KeyPressed, e);
} }
} }
} }
@ -192,9 +194,9 @@ void OpenGLESPage::OnCharacterReceived(CoreWindow^ sender, CharacterReceivedEven
void OpenGLESPage::OnKeyReleased(CoreWindow^ sender, KeyEventArgs^ e) void OpenGLESPage::OnKeyReleased(CoreWindow^ sender, KeyEventArgs^ e)
{ {
//log("OpenGLESPage::OnKeyReleased %d", e->VirtualKey); //log("OpenGLESPage::OnKeyReleased %d", e->VirtualKey);
if (m_renderer) if (mRenderer)
{ {
m_renderer->QueueKeyboardEvent(WinRTKeyboardEventType::KeyReleased, e); mRenderer->QueueKeyboardEvent(WinRTKeyboardEventType::KeyReleased, e);
} }
} }
@ -202,18 +204,20 @@ void OpenGLESPage::OnKeyReleased(CoreWindow^ sender, KeyEventArgs^ e)
void OpenGLESPage::OnOrientationChanged(DisplayInformation^ sender, Object^ args) void OpenGLESPage::OnOrientationChanged(DisplayInformation^ sender, Object^ args)
{ {
critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection);
m_orientation = sender->CurrentOrientation; mOrientation = sender->CurrentOrientation;
} }
void OpenGLESPage::OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args) void OpenGLESPage::OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args)
{ {
if (args->Visible && mRenderSurface != EGL_NO_SURFACE) if (args->Visible && mRenderSurface != EGL_NO_SURFACE)
{ {
StartRenderLoop(); std::unique_lock<std::mutex> locker(mSleepMutex);
mVisible = true;
mSleepCondition.notify_one();
} }
else else
{ {
StopRenderLoop(); mVisible = false;
} }
} }
@ -230,9 +234,9 @@ void OpenGLESPage::OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Wi
*/ */
void OpenGLESPage::OnBackButtonPressed(Object^ sender, BackPressedEventArgs^ args) void OpenGLESPage::OnBackButtonPressed(Object^ sender, BackPressedEventArgs^ args)
{ {
if (m_renderer) if (mRenderer)
{ {
m_renderer->QueueBackButtonEvent(); mRenderer->QueueBackButtonEvent();
args->Handled = true; args->Handled = true;
} }
} }
@ -291,19 +295,13 @@ void OpenGLESPage::DestroyRenderSurface()
void OpenGLESPage::RecoverFromLostDevice() void OpenGLESPage::RecoverFromLostDevice()
{ {
// Stop the render loop, reset OpenGLES, recreate the render surface critical_section::scoped_lock lock(mRenderSurfaceCriticalSection);
// and start the render loop again to recover from a lost device. DestroyRenderSurface();
mOpenGLES->Reset();
StopRenderLoop(); CreateRenderSurface();
std::unique_lock<std::mutex> locker(mSleepMutex);
{ mDeviceLost = false;
critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); mSleepCondition.notify_one();
DestroyRenderSurface();
mOpenGLES->Reset();
CreateRenderSurface();
}
StartRenderLoop();
} }
void OpenGLESPage::TerminateApp() void OpenGLESPage::TerminateApp()
@ -330,45 +328,59 @@ void OpenGLESPage::StartRenderLoop()
} }
DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView();
m_dpi = currentDisplayInformation->LogicalDpi; mDpi = currentDisplayInformation->LogicalDpi;
auto dispatcher = Windows::UI::Xaml::Window::Current->CoreWindow->Dispatcher; auto dispatcher = Windows::UI::Xaml::Window::Current->CoreWindow->Dispatcher;
// Create a task for rendering that will be run on a background thread. // Create a task for rendering that will be run on a background thread.
auto workItemHandler = ref new Windows::System::Threading::WorkItemHandler([this, dispatcher](Windows::Foundation::IAsyncAction ^ action) auto workItemHandler = ref new Windows::System::Threading::WorkItemHandler([this, dispatcher](Windows::Foundation::IAsyncAction ^ action)
{ {
critical_section::scoped_lock lock(mRenderSurfaceCriticalSection);
mOpenGLES->MakeCurrent(mRenderSurface); mOpenGLES->MakeCurrent(mRenderSurface);
GLsizei panelWidth = 0; GLsizei panelWidth = 0;
GLsizei panelHeight = 0; GLsizei panelHeight = 0;
GetSwapChainPanelSize(&panelWidth, &panelHeight); GetSwapChainPanelSize(&panelWidth, &panelHeight);
if (m_renderer.get() == nullptr) if (mRenderer.get() == nullptr)
{ {
m_renderer = std::make_shared<Cocos2dRenderer>(panelWidth, panelHeight, m_dpi, m_orientation, dispatcher, swapChainPanel); mRenderer = std::make_shared<Cocos2dRenderer>(panelWidth, panelHeight, mDpi, mOrientation, dispatcher, swapChainPanel);
} }
if (m_deviceLost) mRenderer->Resume();
{
m_deviceLost = false;
m_renderer->DeviceLost();
}
else
{
m_renderer->Resume();
}
while (action->Status == Windows::Foundation::AsyncStatus::Started)
while (action->Status == Windows::Foundation::AsyncStatus::Started && !m_deviceLost)
{ {
GetSwapChainPanelSize(&panelWidth, &panelHeight); if (!mVisible)
m_renderer.get()->Draw(panelWidth, panelHeight, m_dpi, m_orientation);
// run on main UI thread
if (m_renderer->AppShouldExit())
{ {
mRenderer->Pause();
}
while (!mVisible)
{
std::unique_lock<std::mutex> lock(mSleepMutex);
mSleepCondition.wait(lock);
if (action->Status != Windows::Foundation::AsyncStatus::Started)
{
return; // thread was cancelled. Exit thread
}
if (mVisible)
{
mRenderer->Resume();
}
else // spurious wake up
{
continue;
}
}
GetSwapChainPanelSize(&panelWidth, &panelHeight);
mRenderer.get()->Draw(panelWidth, panelHeight, mDpi, mOrientation);
if (mRenderer->AppShouldExit())
{
// run on main UI thread
swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([this]() swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([this]()
{ {
TerminateApp(); TerminateApp();
@ -376,31 +388,48 @@ void OpenGLESPage::StartRenderLoop()
return; return;
} }
else if (mOpenGLES->SwapBuffers(mRenderSurface) != GL_TRUE)
EGLBoolean result = GL_FALSE;
{ {
// The call to eglSwapBuffers might not be successful (i.e. due to Device Lost) critical_section::scoped_lock lock(mRenderSurfaceCriticalSection);
result = mOpenGLES->SwapBuffers(mRenderSurface);
}
if (result != GL_TRUE)
{
// The call to eglSwapBuffers was not be successful (i.e. due to Device Lost)
// If the call fails, then we must reinitialize EGL and the GL resources. // If the call fails, then we must reinitialize EGL and the GL resources.
mRenderer->Pause();
m_deviceLost = true; mDeviceLost = true;
if (m_renderer)
{
m_renderer->Pause();
}
// XAML objects like the SwapChainPanel must only be manipulated on the UI thread. // XAML objects like the SwapChainPanel must only be manipulated on the UI thread.
swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::High, ref new Windows::UI::Core::DispatchedHandler([=]() swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::High, ref new Windows::UI::Core::DispatchedHandler([=]()
{ {
RecoverFromLostDevice(); RecoverFromLostDevice();
}, CallbackContext::Any)); }, CallbackContext::Any));
return; while (mDeviceLost)
} {
} std::unique_lock<std::mutex> lock(mSleepMutex);
mSleepCondition.wait(lock);
if (m_renderer) if (action->Status != Windows::Foundation::AsyncStatus::Started)
{ {
m_renderer->Pause(); return; // thread was cancelled. Exit thread
}
if (!mDeviceLost)
{
// restart cocos2d-x
mRenderer->DeviceLost();
}
else // spurious wake up
{
continue;
}
}
}
} }
}); });
@ -413,6 +442,8 @@ void OpenGLESPage::StopRenderLoop()
if (mRenderLoopWorker) if (mRenderLoopWorker)
{ {
mRenderLoopWorker->Cancel(); mRenderLoopWorker->Cancel();
std::unique_lock<std::mutex> locker(mSleepMutex);
mSleepCondition.notify_one();
mRenderLoopWorker = nullptr; mRenderLoopWorker = nullptr;
} }
} }

View File

@ -21,6 +21,8 @@
#include "OpenGLES.h" #include "OpenGLES.h"
#include "OpenGLESPage.g.h" #include "OpenGLESPage.g.h"
#include <memory> #include <memory>
#include <condition_variable>
#include <mutex>
#include "Cocos2dRenderer.h" #include "Cocos2dRenderer.h"
@ -51,7 +53,7 @@ namespace cocos2d
void StopRenderLoop(); void StopRenderLoop();
OpenGLES* mOpenGLES; OpenGLES* mOpenGLES;
std::shared_ptr<cocos2d::Cocos2dRenderer> m_renderer; std::shared_ptr<cocos2d::Cocos2dRenderer> mRenderer;
Windows::Foundation::Size mSwapChainPanelSize; Windows::Foundation::Size mSwapChainPanelSize;
Concurrency::critical_section mSwapChainPanelSizeCriticalSection; Concurrency::critical_section mSwapChainPanelSizeCriticalSection;
@ -64,8 +66,8 @@ namespace cocos2d
Windows::Foundation::IAsyncAction^ mRenderLoopWorker; Windows::Foundation::IAsyncAction^ mRenderLoopWorker;
// Track user input on a background worker thread. // Track user input on a background worker thread.
Windows::Foundation::IAsyncAction^ m_inputLoopWorker; Windows::Foundation::IAsyncAction^ mInputLoopWorker;
Windows::UI::Core::CoreIndependentInputSource^ m_coreInput; Windows::UI::Core::CoreIndependentInputSource^ mCoreInput;
// Independent input handling functions. // Independent input handling functions.
void OnPointerPressed(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); void OnPointerPressed(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e);
@ -77,9 +79,12 @@ namespace cocos2d
void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
float m_dpi; float mDpi;
bool m_deviceLost; bool mDeviceLost;
Windows::Graphics::Display::DisplayOrientations m_orientation; bool mVisible;
Windows::Graphics::Display::DisplayOrientations mOrientation;
std::mutex mSleepMutex;
std::condition_variable mSleepCondition;
}; };
} }

View File

@ -125,6 +125,9 @@
<SDLCheck>false</SDLCheck> <SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link>
<IgnoreSpecificDefaultLibraries>MSVCRT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
@ -145,6 +148,9 @@
<SDLCheck>false</SDLCheck> <SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link>
<IgnoreSpecificDefaultLibraries>MSVCRT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
@ -165,6 +171,9 @@
<SDLCheck>false</SDLCheck> <SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link>
<IgnoreSpecificDefaultLibraries>MSVCRT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>

View File

@ -91,6 +91,9 @@
<SDLCheck>false</SDLCheck> <SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>CC_WINDOWS_PHONE_8_1;CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>CC_WINDOWS_PHONE_8_1;CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link>
<IgnoreSpecificDefaultLibraries>MSVCRT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile> <ClCompile>
@ -111,6 +114,9 @@
<SDLCheck>false</SDLCheck> <SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>CC_WINDOWS_PHONE_8_1;CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>CC_WINDOWS_PHONE_8_1;CC_ENABLE_BULLET_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link>
<IgnoreSpecificDefaultLibraries>MSVCRT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>