本文整理汇总了C++中EGLView::setFrameSize方法的典型用法代码示例。如果您正苦于以下问题:C++ EGLView::setFrameSize方法的具体用法?C++ EGLView::setFrameSize怎么用?C++ EGLView::setFrameSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EGLView
的用法示例。
在下文中一共展示了EGLView::setFrameSize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resizeGL
void MyQGLWidget::resizeGL(int w, int h)
{
if (Display::IsRetinaDisplay())
{
w >>= 1;
h >>= 1;
}
if (!mLazyInit)
{
mLazyInit = true;
EGLView* view = EGLView::sharedOpenGLView();
view->setFrameSize(w, h);
Director* director = Director::sharedDirector();
director->setContentScaleFactor(1);
director->setProjection(kDirectorProjection2D);
//director->setDisplayStats(true);
director->setOpenGLView(view);
connect(&mTimer, SIGNAL(timeout()), this, SLOT(updateGL()));
mTimer.start();
Scene* scene = Scene::create();
director->pushScene(scene);
setMouseTracking(true);
}
EGLView* view = EGLView::sharedOpenGLView();
view->setFrameSize(w, h);
view->setDesignResolutionSize(w, h, kResolutionNoBorder);
}
示例2: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
#ifdef USE_WIN32_CONSOLE
AllocConsole();
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
#endif
// create the application instance
AppDelegate app;
EGLView* eglView = EGLView::getInstance();
eglView->setViewName("MoonWarriors");
eglView->setFrameSize(320, 480);
int ret = Application::getInstance()->run();
#ifdef USE_WIN32_CONSOLE
FreeConsole();
#endif
return ret;
}
示例3: main
int main(int argc, char **argv)
{
// create the application instance
AppDelegate app;
EGLView* eglView = EGLView::getInstance();
eglView->setFrameSize(960, 640);
return Application::getInstance()->run();
}
示例4: main
int main(int argc, char **argv)
{
// create the application instance
AppDelegate app;
EGLView* eglView = EGLView::sharedOpenGLView();
eglView->setFrameSize(800, 480);
return Application::sharedApplication()->run();
}
示例5: _tWinMain
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("testcard");
eglView->setFrameSize(1136, 640);
return Application::getInstance()->run();
}
示例6: Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit
void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thiz, jint w, jint h)
{
if (!Director::getInstance()->getOpenGLView())
{
EGLView *view = EGLView::getInstance();
view->setFrameSize(w, h);
AppDelegate *pAppDelegate = new AppDelegate();
Application::getInstance()->run();
}
else
{
GL::invalidateStateCache();
ShaderCache::getInstance()->reloadDefaultShaders();
DrawPrimitives::init();
TextureCache::reloadAllTextures();
NotificationCenter::getInstance()->postNotification(EVNET_COME_TO_FOREGROUND, NULL);
Director::getInstance()->setGLDefaultValues();
}
}