当前位置: 首页>>代码示例>>C++>>正文


C++ EGLView::setFrameSize方法代码示例

本文整理汇总了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);
}
开发者ID:UIKit0,项目名称:ccgraphedit,代码行数:34,代码来源:myqglwidget.cpp

示例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;
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:29,代码来源:main.cpp

示例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();
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:8,代码来源:main.cpp

示例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();
}
开发者ID:bassarisse,项目名称:LostInCaves,代码行数:10,代码来源:main.cpp

示例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();
}
开发者ID:oraclehan,项目名称:ruiyou,代码行数:15,代码来源:main.cpp

示例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(); 
    }
}
开发者ID:CBanDa,项目名称:cocos2d-x-3.0alpha0-pre,代码行数:20,代码来源:main.cpp


注:本文中的EGLView::setFrameSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。