mirror of https://github.com/axmolengine/axmol.git
fix winrt complie error
This commit is contained in:
parent
b7aa046cd2
commit
8ee4340db3
|
@ -357,6 +357,7 @@
|
|||
<ClCompile Include="..\base\ccUtils.cpp" />
|
||||
<ClCompile Include="..\base\CCValue.cpp" />
|
||||
<ClCompile Include="..\base\etc1.cpp" />
|
||||
<ClCompile Include="..\base\pvr.cpp" />
|
||||
<ClCompile Include="..\base\s3tc.cpp" />
|
||||
<ClCompile Include="..\base\TGAlib.cpp" />
|
||||
<ClCompile Include="..\base\ZipUtils.cpp" />
|
||||
|
@ -388,7 +389,7 @@
|
|||
<ClCompile Include="..\physics\chipmunk\CCPhysicsShapeInfo_chipmunk.cpp" />
|
||||
<ClCompile Include="..\physics\chipmunk\CCPhysicsWorldInfo_chipmunk.cpp" />
|
||||
<ClCompile Include="..\platform\CCFileUtils.cpp" />
|
||||
<ClCompile Include="..\platform\CCGLViewProtocol.cpp" />
|
||||
<ClCompile Include="..\platform\CCGLView.cpp" />
|
||||
<ClCompile Include="..\platform\CCImage.cpp" />
|
||||
<ClCompile Include="..\platform\CCSAXParser.cpp" />
|
||||
<ClCompile Include="..\platform\CCThread.cpp" />
|
||||
|
@ -397,7 +398,7 @@
|
|||
<ClCompile Include="..\platform\winrt\CCDevice.cpp" />
|
||||
<ClCompile Include="..\platform\winrt\CCFileUtilsWinRT.cpp" />
|
||||
<ClCompile Include="..\platform\winrt\CCFreeTypeFont.cpp" />
|
||||
<ClCompile Include="..\platform\winrt\CCGLView.cpp" />
|
||||
<ClCompile Include="..\platform\winrt\CCGLViewImpl.cpp" />
|
||||
<ClCompile Include="..\platform\winrt\CCPrecompiledShaders.cpp" />
|
||||
<ClCompile Include="..\platform\winrt\CCPThreadWinRT.cpp" />
|
||||
<ClCompile Include="..\platform\winrt\CCStdC.cpp" />
|
||||
|
@ -552,6 +553,7 @@
|
|||
<ClInclude Include="..\base\CCVector.h" />
|
||||
<ClInclude Include="..\base\etc1.h" />
|
||||
<ClInclude Include="..\base\firePngData.h" />
|
||||
<ClInclude Include="..\base\pvr.h" />
|
||||
<ClInclude Include="..\base\s3tc.h" />
|
||||
<ClInclude Include="..\base\TGAlib.h" />
|
||||
<ClInclude Include="..\base\uthash.h" />
|
||||
|
@ -595,7 +597,7 @@
|
|||
<ClInclude Include="..\platform\CCCommon.h" />
|
||||
<ClInclude Include="..\platform\CCDevice.h" />
|
||||
<ClInclude Include="..\platform\CCFileUtils.h" />
|
||||
<ClInclude Include="..\platform\CCGLViewProtocol.h" />
|
||||
<ClInclude Include="..\platform\CCGLView.h" />
|
||||
<ClInclude Include="..\platform\CCImage.h" />
|
||||
<ClInclude Include="..\platform\CCSAXParser.h" />
|
||||
<ClInclude Include="..\platform\CCThread.h" />
|
||||
|
@ -603,7 +605,7 @@
|
|||
<ClInclude Include="..\platform\winrt\CCFileUtilsWinRT.h" />
|
||||
<ClInclude Include="..\platform\winrt\CCFreeTypeFont.h" />
|
||||
<ClInclude Include="..\platform\winrt\CCGL.h" />
|
||||
<ClInclude Include="..\platform\winrt\CCGLView.h" />
|
||||
<ClInclude Include="..\platform\winrt\CCGLViewImpl.h" />
|
||||
<ClInclude Include="..\platform\winrt\CCGL_Angle.h" />
|
||||
<ClInclude Include="..\platform\winrt\CCPlatformDefine.h" />
|
||||
<ClInclude Include="..\platform\winrt\CCPrecompiledShaders.h" />
|
||||
|
|
|
@ -71,9 +71,6 @@
|
|||
<ClCompile Include="..\platform\winrt\CCFreeTypeFont.cpp">
|
||||
<Filter>platform\winrt</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\platform\winrt\CCGLView.cpp">
|
||||
<Filter>platform\winrt</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\platform\winrt\CCPrecompiledShaders.cpp">
|
||||
<Filter>platform\winrt</Filter>
|
||||
</ClCompile>
|
||||
|
@ -98,9 +95,6 @@
|
|||
<ClCompile Include="..\platform\CCFileUtils.cpp">
|
||||
<Filter>platform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\platform\CCGLViewProtocol.cpp">
|
||||
<Filter>platform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\platform\CCImage.cpp">
|
||||
<Filter>platform</Filter>
|
||||
</ClCompile>
|
||||
|
@ -410,9 +404,6 @@
|
|||
<ClCompile Include="..\base\CCUserDefault.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\base\CCUserDefaultAndroid.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\base\ccUTF8.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
|
@ -581,6 +572,15 @@
|
|||
<ClCompile Include="..\physics\CCPhysicsWorld.cpp">
|
||||
<Filter>physics</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\platform\CCGLView.cpp">
|
||||
<Filter>platform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\platform\winrt\CCGLViewImpl.cpp">
|
||||
<Filter>platform\winrt</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\base\pvr.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\cocos2d.h" />
|
||||
|
@ -600,9 +600,6 @@
|
|||
<ClInclude Include="..\platform\winrt\CCGL_Angle.h">
|
||||
<Filter>platform\winrt</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\platform\winrt\CCGLView.h">
|
||||
<Filter>platform\winrt</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\platform\winrt\CCPlatformDefine.h">
|
||||
<Filter>platform\winrt</Filter>
|
||||
</ClInclude>
|
||||
|
@ -645,9 +642,6 @@
|
|||
<ClInclude Include="..\platform\CCFileUtils.h">
|
||||
<Filter>platform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\platform\CCGLViewProtocol.h">
|
||||
<Filter>platform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\platform\CCImage.h">
|
||||
<Filter>platform</Filter>
|
||||
</ClInclude>
|
||||
|
@ -1185,6 +1179,15 @@
|
|||
<ClInclude Include="..\physics\CCPhysicsWorld.h">
|
||||
<Filter>physics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\platform\CCGLView.h">
|
||||
<Filter>platform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\platform\winrt\CCGLViewImpl.h">
|
||||
<Filter>platform\winrt</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\base\pvr.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\base\CCUserDefault.mm">
|
||||
|
|
|
@ -945,14 +945,14 @@ bool FileUtils::isAbsolutePath(const std::string& path) const
|
|||
|
||||
bool FileUtils::isDirectoryExistInternal(const std::string& dirPath) const
|
||||
{
|
||||
#if !((CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8))
|
||||
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) && (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT)
|
||||
struct stat st;
|
||||
if (stat(dirPath.c_str(), &st) == 0)
|
||||
{
|
||||
return S_ISDIR(st.st_mode);
|
||||
}
|
||||
return false;
|
||||
#elif (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32)
|
||||
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
WIN32_FILE_ATTRIBUTE_DATA wfad;
|
||||
if (GetFileAttributesExA(dirPath.c_str(), GetFileExInfoStandard, &wfad))
|
||||
{
|
||||
|
@ -1037,7 +1037,7 @@ bool FileUtils::createDirectory(const std::string& path)
|
|||
}
|
||||
}
|
||||
|
||||
#if !((CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8))
|
||||
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) && (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT)
|
||||
DIR *dir = NULL;
|
||||
|
||||
// Create path recursively
|
||||
|
@ -1055,7 +1055,7 @@ bool FileUtils::createDirectory(const std::string& path)
|
|||
}
|
||||
}
|
||||
return true;
|
||||
#elif (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32)
|
||||
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
WIN32_FILE_ATTRIBUTE_DATA wfad;
|
||||
if (!(GetFileAttributesExA(path.c_str(), GetFileExInfoStandard, &wfad)))
|
||||
{
|
||||
|
@ -1098,7 +1098,7 @@ bool FileUtils::removeDirectory(const std::string& path)
|
|||
}
|
||||
|
||||
// Remove downloaded files
|
||||
#if !((CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8))
|
||||
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) && (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT)
|
||||
std::string command = "rm -r ";
|
||||
// Path may include space.
|
||||
command += "\"" + path + "\"";
|
||||
|
@ -1106,7 +1106,7 @@ bool FileUtils::removeDirectory(const std::string& path)
|
|||
return true;
|
||||
else
|
||||
return false;
|
||||
#elif (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32)
|
||||
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
if (RemoveDirectoryA(path.c_str()))
|
||||
{
|
||||
return true;
|
||||
|
@ -1126,7 +1126,7 @@ bool FileUtils::removeDirectory(const std::string& path)
|
|||
bool FileUtils::removeFile(const std::string &path)
|
||||
{
|
||||
// Remove downloaded file
|
||||
#if !((CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8))
|
||||
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) && (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT)
|
||||
std::string command = "rm -f ";
|
||||
// Path may include space.
|
||||
command += "\"" + path + "\"";
|
||||
|
@ -1134,7 +1134,7 @@ bool FileUtils::removeFile(const std::string &path)
|
|||
return true;
|
||||
else
|
||||
return false;
|
||||
#elif (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32)
|
||||
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
if (DeleteFileA(path.c_str()))
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -24,7 +24,7 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
#include "CCApplication.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT
|
||||
#include "platform/winrt/CCGLView.h"
|
||||
#include "platform/winrt/CCGLViewImpl.h"
|
||||
#else
|
||||
#include "platform/wp8/CCGLViewImpl.h"
|
||||
#endif
|
||||
|
|
|
@ -26,7 +26,7 @@ THE SOFTWARE.
|
|||
#include "base/CCPlatformConfig.h"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
|
||||
#include "CCGLView.h"
|
||||
#include "CCGLViewImpl.h"
|
||||
#include "base/ccMacros.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "base/CCTouch.h"
|
||||
|
@ -54,7 +54,7 @@ using namespace Windows::UI::ViewManagement;
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
static GLView* s_pEglView = NULL;
|
||||
static GLViewImpl* s_pEglView = NULL;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// impliment GLView
|
||||
|
@ -165,7 +165,7 @@ void WinRTWindow::OnSuspending()
|
|||
|
||||
void WinRTWindow::ResizeWindow()
|
||||
{
|
||||
GLView::sharedOpenGLView()->UpdateForWindowSizeChange();
|
||||
GLViewImpl::sharedOpenGLView()->UpdateForWindowSizeChange();
|
||||
}
|
||||
|
||||
cocos2d::Vec2 WinRTWindow::GetCCPoint(PointerEventArgs^ args) {
|
||||
|
@ -174,7 +174,7 @@ cocos2d::Vec2 WinRTWindow::GetCCPoint(PointerEventArgs^ args) {
|
|||
float y = getScaledDPIValue(p->Position.Y);
|
||||
Vec2 pt(x, y);
|
||||
|
||||
float zoomFactor = GLView::sharedOpenGLView()->getFrameZoomFactor();
|
||||
float zoomFactor = GLViewImpl::sharedOpenGLView()->getFrameZoomFactor();
|
||||
|
||||
if(zoomFactor > 0.0f) {
|
||||
pt.x /= zoomFactor;
|
||||
|
@ -185,12 +185,12 @@ cocos2d::Vec2 WinRTWindow::GetCCPoint(PointerEventArgs^ args) {
|
|||
|
||||
void WinRTWindow::ShowKeyboard(InputPane^ inputPane, InputPaneVisibilityEventArgs^ args)
|
||||
{
|
||||
GLView::sharedOpenGLView()->ShowKeyboard(args->OccludedRect);
|
||||
GLViewImpl::sharedOpenGLView()->ShowKeyboard(args->OccludedRect);
|
||||
}
|
||||
|
||||
void WinRTWindow::HideKeyboard(InputPane^ inputPane, InputPaneVisibilityEventArgs^ args)
|
||||
{
|
||||
GLView::sharedOpenGLView()->HideKeyboard(args->OccludedRect);
|
||||
GLViewImpl::sharedOpenGLView()->HideKeyboard(args->OccludedRect);
|
||||
}
|
||||
|
||||
void WinRTWindow::setIMEKeyboardState(bool bOpen)
|
||||
|
@ -268,14 +268,14 @@ void WinRTWindow::OnPointerWheelChanged(CoreWindow^ sender, PointerEventArgs^ ar
|
|||
float direction = (float)args->CurrentPoint->Properties->MouseWheelDelta;
|
||||
int id = 0;
|
||||
Vec2 p(0.0f,0.0f);
|
||||
GLView::sharedOpenGLView()->handleTouchesBegin(1, &id, &p.x, &p.y);
|
||||
GLViewImpl::sharedOpenGLView()->handleTouchesBegin(1, &id, &p.x, &p.y);
|
||||
p.y += direction;
|
||||
GLView::sharedOpenGLView()->handleTouchesMove(1, &id, &p.x, &p.y);
|
||||
GLView::sharedOpenGLView()->handleTouchesEnd(1, &id, &p.x, &p.y);
|
||||
GLViewImpl::sharedOpenGLView()->handleTouchesMove(1, &id, &p.x, &p.y);
|
||||
GLViewImpl::sharedOpenGLView()->handleTouchesEnd(1, &id, &p.x, &p.y);
|
||||
}
|
||||
|
||||
// user pressed the Back Key on the phone
|
||||
void GLView::OnBackKeyPress()
|
||||
void GLViewImpl::OnBackKeyPress()
|
||||
{
|
||||
#if 0
|
||||
if (m_delegate)
|
||||
|
@ -287,7 +287,7 @@ void GLView::OnBackKeyPress()
|
|||
}
|
||||
|
||||
|
||||
void GLView::OnPointerPressed(PointerEventArgs^ args)
|
||||
void GLViewImpl::OnPointerPressed(PointerEventArgs^ args)
|
||||
{
|
||||
#if 0
|
||||
int id = args->CurrentPoint->PointerId;
|
||||
|
@ -296,7 +296,7 @@ void GLView::OnPointerPressed(PointerEventArgs^ args)
|
|||
#endif
|
||||
}
|
||||
|
||||
void GLView::OnPointerMoved(PointerEventArgs^ args)
|
||||
void GLViewImpl::OnPointerMoved(PointerEventArgs^ args)
|
||||
{
|
||||
#if 0
|
||||
auto currentPoint = args->CurrentPoint;
|
||||
|
@ -318,7 +318,7 @@ void GLView::OnPointerMoved(PointerEventArgs^ args)
|
|||
#endif
|
||||
}
|
||||
|
||||
void GLView::OnPointerReleased(PointerEventArgs^ args)
|
||||
void GLViewImpl::OnPointerReleased(PointerEventArgs^ args)
|
||||
{
|
||||
#if 0
|
||||
int id = args->CurrentPoint->PointerId;
|
||||
|
@ -334,7 +334,7 @@ void WinRTWindow::OnPointerPressed(CoreWindow^ sender, PointerEventArgs^ args)
|
|||
{
|
||||
int id = args->CurrentPoint->PointerId;
|
||||
Vec2 pt = GetCCPoint(args);
|
||||
GLView::sharedOpenGLView()->handleTouchesBegin(1, &id, &pt.x, &pt.y);
|
||||
GLViewImpl::sharedOpenGLView()->handleTouchesBegin(1, &id, &pt.x, &pt.y);
|
||||
}
|
||||
|
||||
void WinRTWindow::OnPointerMoved(CoreWindow^ sender, PointerEventArgs^ args)
|
||||
|
@ -346,7 +346,7 @@ void WinRTWindow::OnPointerMoved(CoreWindow^ sender, PointerEventArgs^ args)
|
|||
{
|
||||
int id = args->CurrentPoint->PointerId;
|
||||
Vec2 p = GetCCPoint(args);
|
||||
GLView::sharedOpenGLView()->handleTouchesMove(1, &id, &p.x, &p.y);
|
||||
GLViewImpl::sharedOpenGLView()->handleTouchesMove(1, &id, &p.x, &p.y);
|
||||
}
|
||||
m_lastPoint = currentPoint->Position;
|
||||
m_lastPointValid = true;
|
||||
|
@ -361,38 +361,38 @@ void WinRTWindow::OnPointerReleased(CoreWindow^ sender, PointerEventArgs^ args)
|
|||
{
|
||||
int id = args->CurrentPoint->PointerId;
|
||||
Vec2 pt = GetCCPoint(args);
|
||||
GLView::sharedOpenGLView()->handleTouchesEnd(1, &id, &pt.x, &pt.y);
|
||||
GLViewImpl::sharedOpenGLView()->handleTouchesEnd(1, &id, &pt.x, &pt.y);
|
||||
}
|
||||
|
||||
void WinRTWindow::OnWindowSizeChanged(CoreWindow^ sender, WindowSizeChangedEventArgs^ args)
|
||||
{
|
||||
ResizeWindow();
|
||||
GLView::sharedOpenGLView()->UpdateForWindowSizeChange();
|
||||
GLViewImpl::sharedOpenGLView()->UpdateForWindowSizeChange();
|
||||
}
|
||||
|
||||
void WinRTWindow::OnLogicalDpiChanged(Object^ sender)
|
||||
{
|
||||
GLView::sharedOpenGLView()->UpdateForWindowSizeChange();
|
||||
GLViewImpl::sharedOpenGLView()->UpdateForWindowSizeChange();
|
||||
}
|
||||
|
||||
void WinRTWindow::OnOrientationChanged(Object^ sender)
|
||||
{
|
||||
ResizeWindow();
|
||||
GLView::sharedOpenGLView()->UpdateForWindowSizeChange();
|
||||
GLViewImpl::sharedOpenGLView()->UpdateForWindowSizeChange();
|
||||
}
|
||||
|
||||
void WinRTWindow::OnDisplayContentsInvalidated(Object^ sender)
|
||||
{
|
||||
GLView::sharedOpenGLView()->UpdateForWindowSizeChange();
|
||||
GLViewImpl::sharedOpenGLView()->UpdateForWindowSizeChange();
|
||||
}
|
||||
|
||||
void WinRTWindow::OnRendering(Object^ sender, Object^ args)
|
||||
{
|
||||
GLView::sharedOpenGLView()->OnRendering();
|
||||
GLViewImpl::sharedOpenGLView()->OnRendering();
|
||||
}
|
||||
|
||||
|
||||
GLView::GLView()
|
||||
GLViewImpl::GLViewImpl()
|
||||
: m_window(nullptr)
|
||||
, m_fFrameZoomFactor(1.0f)
|
||||
, m_bSupportTouch(false)
|
||||
|
@ -405,7 +405,7 @@ GLView::GLView()
|
|||
_viewName = "Cocos2dxWinRT";
|
||||
}
|
||||
|
||||
GLView::~GLView()
|
||||
GLViewImpl::~GLViewImpl()
|
||||
{
|
||||
CC_ASSERT(this == s_pEglView);
|
||||
s_pEglView = NULL;
|
||||
|
@ -413,7 +413,7 @@ GLView::~GLView()
|
|||
// TODO: cleanup
|
||||
}
|
||||
|
||||
bool GLView::Create(CoreWindow^ window, SwapChainBackgroundPanel^ panel)
|
||||
bool GLViewImpl::Create(CoreWindow^ window, SwapChainBackgroundPanel^ panel)
|
||||
{
|
||||
bool bRet = false;
|
||||
m_window = window;
|
||||
|
@ -426,25 +426,25 @@ bool GLView::Create(CoreWindow^ window, SwapChainBackgroundPanel^ panel)
|
|||
return bRet;
|
||||
}
|
||||
|
||||
bool GLView::isOpenGLReady()
|
||||
bool GLViewImpl::isOpenGLReady()
|
||||
{
|
||||
// TODO: need to revisit this
|
||||
return (m_window.Get() != nullptr);
|
||||
}
|
||||
|
||||
void GLView::end()
|
||||
void GLViewImpl::end()
|
||||
{
|
||||
// TODO: need to implement
|
||||
|
||||
}
|
||||
|
||||
void GLView::swapBuffers()
|
||||
void GLViewImpl::swapBuffers()
|
||||
{
|
||||
m_winRTWindow->swapBuffers();
|
||||
}
|
||||
|
||||
|
||||
void GLView::setIMEKeyboardState(bool bOpen)
|
||||
void GLViewImpl::setIMEKeyboardState(bool bOpen)
|
||||
{
|
||||
if(m_winRTWindow)
|
||||
{
|
||||
|
@ -453,12 +453,12 @@ void GLView::setIMEKeyboardState(bool bOpen)
|
|||
}
|
||||
|
||||
|
||||
void GLView::resize(int width, int height)
|
||||
void GLViewImpl::resize(int width, int height)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GLView::setFrameZoomFactor(float fZoomFactor)
|
||||
void GLViewImpl::setFrameZoomFactor(float fZoomFactor)
|
||||
{
|
||||
m_fFrameZoomFactor = fZoomFactor;
|
||||
resize((int) (_screenSize.width * fZoomFactor), (int) (_screenSize.height * fZoomFactor));
|
||||
|
@ -467,23 +467,23 @@ void GLView::setFrameZoomFactor(float fZoomFactor)
|
|||
}
|
||||
|
||||
|
||||
float GLView::getFrameZoomFactor()
|
||||
float GLViewImpl::getFrameZoomFactor()
|
||||
{
|
||||
return m_fFrameZoomFactor;
|
||||
}
|
||||
|
||||
void GLView::setFrameSize(float width, float height)
|
||||
void GLViewImpl::setFrameSize(float width, float height)
|
||||
{
|
||||
// not implemented in WinRT. Window is always full screen
|
||||
// GLViewProtocol::setFrameSize(width, height);
|
||||
}
|
||||
|
||||
void GLView::centerWindow()
|
||||
void GLViewImpl::centerWindow()
|
||||
{
|
||||
// not implemented in WinRT. Window is always full screen
|
||||
}
|
||||
|
||||
void GLView::OnSuspending()
|
||||
void GLViewImpl::OnSuspending()
|
||||
{
|
||||
if (m_winRTWindow)
|
||||
{
|
||||
|
@ -491,12 +491,12 @@ void GLView::OnSuspending()
|
|||
}
|
||||
}
|
||||
|
||||
GLView* GLView::sharedOpenGLView()
|
||||
GLViewImpl* GLViewImpl::sharedOpenGLView()
|
||||
{
|
||||
return s_pEglView;
|
||||
}
|
||||
|
||||
int GLView::Run()
|
||||
int GLViewImpl::Run()
|
||||
{
|
||||
m_running = true;
|
||||
|
||||
|
@ -504,7 +504,7 @@ int GLView::Run()
|
|||
};
|
||||
|
||||
|
||||
void GLView::OnRendering()
|
||||
void GLViewImpl::OnRendering()
|
||||
{
|
||||
if(m_running && m_initialized)
|
||||
{
|
||||
|
@ -512,7 +512,7 @@ void GLView::OnRendering()
|
|||
}
|
||||
}
|
||||
|
||||
void GLView::HideKeyboard(Windows::Foundation::Rect r)
|
||||
void GLViewImpl::HideKeyboard(Windows::Foundation::Rect r)
|
||||
{
|
||||
return; // not implemented
|
||||
#if 0
|
||||
|
@ -532,7 +532,7 @@ void GLView::HideKeyboard(Windows::Foundation::Rect r)
|
|||
#endif
|
||||
}
|
||||
|
||||
void GLView::ShowKeyboard(Windows::Foundation::Rect r)
|
||||
void GLViewImpl::ShowKeyboard(Windows::Foundation::Rect r)
|
||||
{
|
||||
return; // not implemented
|
||||
#if 0
|
||||
|
@ -554,7 +554,7 @@ void GLView::ShowKeyboard(Windows::Foundation::Rect r)
|
|||
}
|
||||
|
||||
|
||||
void GLView::UpdateForWindowSizeChange()
|
||||
void GLViewImpl::UpdateForWindowSizeChange()
|
||||
{
|
||||
float width = ConvertDipsToPixels(m_window->Bounds.Width);
|
||||
float height = ConvertDipsToPixels(m_window->Bounds.Height);
|
||||
|
@ -562,18 +562,18 @@ void GLView::UpdateForWindowSizeChange()
|
|||
if(!m_initialized)
|
||||
{
|
||||
m_initialized = true;
|
||||
GLViewProtocol::setFrameSize(width, height);
|
||||
GLView::setFrameSize(width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
setFrameSize(width, height);
|
||||
Size designSize = getDesignResolutionSize();
|
||||
GLView::sharedOpenGLView()->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::SHOW_ALL);
|
||||
GLViewImpl::sharedOpenGLView()->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::SHOW_ALL);
|
||||
Director::sharedDirector()->setProjection(Director::sharedDirector()->getProjection());
|
||||
}
|
||||
}
|
||||
|
||||
void GLView::QueueEvent(std::shared_ptr<InputEvent>& event)
|
||||
void GLViewImpl::QueueEvent(std::shared_ptr<InputEvent>& event)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(mMutex);
|
||||
mInputEvents.push(event);
|
|
@ -23,8 +23,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CC_EGLVIEW_WINRT_H__
|
||||
#define __CC_EGLVIEW_WINRT_H__
|
||||
#ifndef __CC_EGLVIEWIMPL_WINRT_H__
|
||||
#define __CC_EGLVIEWIMPL_WINRT_H__
|
||||
|
||||
#include "base/CCPlatformConfig.h"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
|
@ -33,7 +33,7 @@ THE SOFTWARE.
|
|||
#include "CCGL.h"
|
||||
#include "platform/CCCommon.h"
|
||||
#include "InputEvent.h"
|
||||
#include "platform/CCGLViewProtocol.h"
|
||||
#include "platform/CCGLView.h"
|
||||
#include <agile.h>
|
||||
|
||||
#include <wrl/client.h>
|
||||
|
@ -46,7 +46,7 @@ THE SOFTWARE.
|
|||
NS_CC_BEGIN
|
||||
|
||||
class CCEGL;
|
||||
class GLView;
|
||||
class GLViewImpl;
|
||||
|
||||
ref class WinRTWindow sealed
|
||||
{
|
||||
|
@ -93,14 +93,14 @@ private:
|
|||
ESContext m_esContext;
|
||||
|
||||
|
||||
friend GLView;
|
||||
friend GLViewImpl;
|
||||
};
|
||||
|
||||
class CC_DLL GLView : public Ref, public GLViewProtocol
|
||||
class CC_DLL GLViewImpl : public GLView
|
||||
{
|
||||
public:
|
||||
GLView();
|
||||
virtual ~GLView();
|
||||
GLViewImpl();
|
||||
virtual ~GLViewImpl();
|
||||
|
||||
/* override functions */
|
||||
virtual bool isOpenGLReady();
|
||||
|
@ -114,7 +114,7 @@ public:
|
|||
void UpdateForWindowSizeChange();
|
||||
void OnRendering();
|
||||
void OnSuspending();
|
||||
void GLView::QueueEvent(std::shared_ptr<InputEvent>& event);
|
||||
void GLViewImpl::QueueEvent(std::shared_ptr<InputEvent>& event);
|
||||
|
||||
void OnPointerPressed(Windows::UI::Core::PointerEventArgs^ args);
|
||||
void OnPointerMoved(Windows::UI::Core::PointerEventArgs^ args);
|
||||
|
@ -148,7 +148,7 @@ public:
|
|||
/**
|
||||
@brief get the shared main open gl window
|
||||
*/
|
||||
static GLView* sharedOpenGLView();
|
||||
static GLViewImpl* sharedOpenGLView();
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -169,4 +169,4 @@ NS_CC_END
|
|||
|
||||
#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
|
||||
#endif // end of __CC_EGLVIEW_WINRT_H__
|
||||
#endif // end of __CC_EGLVIEWIMPL_WINRT_H__
|
|
@ -24,7 +24,7 @@ THE SOFTWARE.
|
|||
****************************************************************************/
|
||||
|
||||
#include "InputEvent.h"
|
||||
#include "CCGLView.h"
|
||||
#include "CCGLViewImpl.h"
|
||||
#include "base/CCEventAcceleration.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
|
|
@ -26,7 +26,7 @@ THE SOFTWARE.
|
|||
#include "Cocos2dRenderer.h"
|
||||
#include "cocos2d.h"
|
||||
#include "CCApplication.h"
|
||||
#include "CCGLView.h"
|
||||
#include "CCGLViewImpl.h"
|
||||
#include "AppDelegate.h"
|
||||
#include <ppltasks.h>
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "CCEditBoxImplWp8.h"
|
||||
#include "CCEditBox.h"
|
||||
#include "CCGLView.h"
|
||||
#include "CCGLViewImpl.h"
|
||||
#include "base/CCScriptSupport.h"
|
||||
#include "base/ccUTF8.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue