axmol/samples/Cpp/HelloCpp/proj.win32/main.cpp

25 lines
846 B
C++
Raw Normal View History

#include "main.h"
#include "../Classes/AppDelegate.h"
#include "CCEGLView.h"
USING_NS_CC;
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// create the application instance
AppDelegate app;
EGLView* eglView = EGLView::getInstance();
eglView->setViewName("HelloCpp");
eglView->setFrameSize(2048, 1536);
// The resolution of ipad3 is very large. In general, PC's resolution is smaller than it.
// So we need to invoke 'setFrameZoomFactor'(only valid on desktop(win32, mac, linux)) to make the window smaller.
eglView->setFrameZoomFactor(0.4f);
return Application::sharedApplication()->run();
}