• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ eglTerminate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中eglTerminate函数的典型用法代码示例。如果您正苦于以下问题:C++ eglTerminate函数的具体用法?C++ eglTerminate怎么用?C++ eglTerminate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了eglTerminate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: engine_term_display

static void engine_term_display(struct engine* engine)
{
	if (engine->display != EGL_NO_DISPLAY)
	{
		eglMakeCurrent(engine->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
		if (engine->context != EGL_NO_CONTEXT)
		{
			eglDestroyContext(engine->display, engine->context);
		}
		if (engine->surface != EGL_NO_SURFACE)
		{
			eglDestroySurface(engine->display, engine->surface);
		}
		eglTerminate(engine->display);
	}
	engine->animating = 0;
	engine->display = EGL_NO_DISPLAY;
	engine->context = EGL_NO_CONTEXT;
	engine->surface = EGL_NO_SURFACE;

	renderer_destroy_callback();
}
开发者ID:ColinGilbert,项目名称:noobEngine,代码行数:22,代码来源:main.cpp


示例2: main

int main () {
	display = wl_display_connect (NULL);
	struct wl_registry *registry = wl_display_get_registry (display);
	wl_registry_add_listener (registry, &registry_listener, NULL);
	wl_display_roundtrip (display);
	
	egl_display = eglGetDisplay (display);
	eglInitialize (egl_display, NULL, NULL);
	
	struct window window;
	create_window (&window, WIDTH, HEIGHT);
	
	while (running) {
		wl_display_dispatch_pending (display);
		draw_window (&window);
	}
	
	delete_window (&window);
	eglTerminate (egl_display);
	wl_display_disconnect (display);
	return 0;
}
开发者ID:eyelash,项目名称:tutorials,代码行数:22,代码来源:wayland-egl.c


示例3: drm_egl_uninit

static void drm_egl_uninit(MPGLContext *ctx)
{
    struct priv *p = ctx->priv;
    crtc_release(ctx);

    if (p->vt_switcher_active)
        vt_switcher_destroy(&p->vt_switcher);

    eglMakeCurrent(p->egl.display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
    eglDestroyContext(p->egl.display, p->egl.context);
    eglDestroySurface(p->egl.display, p->egl.surface);
    gbm_surface_destroy(p->gbm.surface);
    eglTerminate(p->egl.display);
    gbm_device_destroy(p->gbm.device);
    p->egl.context = EGL_NO_CONTEXT;
    eglDestroyContext(p->egl.display, p->egl.context);

    if (p->kms) {
        kms_destroy(p->kms);
        p->kms = 0;
    }
}
开发者ID:yoimbert,项目名称:mpv,代码行数:22,代码来源:drm_egl.c


示例4: exit_func

static void exit_func(void)
// Function to be passed to atexit().
{
   if (eglImage != 0)
   {
      if (!eglDestroyImageKHR(state->display, (EGLImageKHR) eglImage))
         printf("eglDestroyImageKHR failed.");
   }


   // clear screen
   glClear( GL_COLOR_BUFFER_BIT );
   eglSwapBuffers(state->display, state->surface);

   // Release OpenGL resources
   eglMakeCurrent( state->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
   eglDestroySurface( state->display, state->surface );
   eglDestroyContext( state->display, state->context );
   eglTerminate( state->display );

   printf("\ncube closed\n");
} // exit_func()
开发者ID:balamark,项目名称:firmware,代码行数:22,代码来源:triangle.c


示例5: system_leave

static DFBResult
system_leave( bool emergency )
{
     DFBResult   ret;

     AndroidDataShared *shared;
     D_ASSERT( m_data != NULL );

     shared = m_data->shared;
     D_ASSERT( shared != NULL );

     dfb_surface_pool_leave( shared->pool );

     /* cleanup EGL related stuff */
     eglDestroyContext( m_data->dpy, m_data->ctx );
     eglTerminate( m_data->dpy );

     D_FREE( m_data );
     m_data = NULL;

     return DFB_OK;
}
开发者ID:lelou6666,项目名称:DirectFB-1.6.3-ab,代码行数:22,代码来源:android_system.c


示例6: gl_terminate

void gl_terminate(screen_window_t *screen_win) {
	// Borrowed from bbutil.c
    // EGL cleanup
    if (egl_disp != EGL_NO_DISPLAY) {
        eglMakeCurrent(egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
        if (egl_surf != EGL_NO_SURFACE) {
            eglDestroySurface(egl_disp, egl_surf);
            egl_surf = EGL_NO_SURFACE;
        }
        if (egl_ctx != EGL_NO_CONTEXT) {
            eglDestroyContext(egl_disp, egl_ctx);
            egl_ctx = EGL_NO_CONTEXT;
        }
        if (screen_win != NULL) {
            screen_destroy_window(*screen_win);
            screen_win = NULL;
        }
        eglTerminate(egl_disp);
        egl_disp = EGL_NO_DISPLAY;
    }
    eglReleaseThread();
}
开发者ID:AppDev666,项目名称:Core-Native-Community-Samples,代码行数:22,代码来源:main.c


示例7: wfdDestroyEvent

QOpenWFDDevice::~QOpenWFDDevice()
{
    delete mEventSocketNotifier;
    wfdDestroyEvent(mDevice,mEvent);

    for (int i = 0; i < mPorts.size(); i++) {
        //probably don't need to remove them from the list
        QList <WFDint> keys = mUsedPipelines.keys(mPorts.at(i));
        for (int keyIndex = 0; keyIndex < keys.size(); keyIndex++) {
            mUsedPipelines.remove(keys.at(keyIndex));
        }
        //but we have to delete them :)
        delete mPorts[i];
    }

    eglDestroyContext(mEglDisplay,mEglContext);
    eglTerminate(mEglDisplay);

    gbm_device_destroy(mGbmDevice);

    wfdDestroyDevice(mDevice);
}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:22,代码来源:qopenwfddevice.cpp


示例8: closeOpenGL

void closeOpenGL()
{
    if (!is_initialized)
        return;

    EGLDisplay eglDpy = eglGetCurrentDisplay();
    if( eglDpy==EGL_NO_DISPLAY )
        return;

    // get current context
    EGLContext eglCtx = eglGetCurrentContext();

    // release context
    eglMakeCurrent(eglDpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);

    // destroy context if valid
    if( eglCtx!=EGL_NO_CONTEXT )
        eglDestroyContext(eglDpy, eglCtx);

    // terminate display
    eglTerminate(eglDpy);
}
开发者ID:jeffkaufman,项目名称:mujoco-py,代码行数:22,代码来源:eglshim.c


示例9: IJK_EGL_terminate

void IJK_EGL_terminate(IJK_EGL* egl)
{
    if (!IJK_EGL_isValid(egl))
        return;

    if (egl->opaque)
        IJK_GLES2_Renderer_freeP(&egl->opaque->renderer);

    if (egl->display) {
        eglMakeCurrent(egl->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
        if (egl->context)
            eglDestroyContext(egl->display, egl->context);
        if (egl->surface)
            eglDestroySurface(egl->display, egl->surface);
        eglTerminate(egl->display);
        eglReleaseThread(); // FIXME: call at thread exit
    }

    egl->context = EGL_NO_CONTEXT;
    egl->surface = EGL_NO_SURFACE;
    egl->display = EGL_NO_DISPLAY;
}
开发者ID:317394245,项目名称:ijkplayer,代码行数:22,代码来源:ijksdl_egl.c


示例10: _DestroyThreadData

static void
_DestroyThreadData(
    gcsTLS_PTR TLS
    )
{
    gcmHEADER_ARG("TLS=0x%x", TLS);

    if (TLS->context != gcvNULL)
    {
        /*VEGLThreadData thread;*/
        VEGLDisplay head;

        /*thread = (VEGLThreadData) TLS->context;*/

        head = (VEGLDisplay) gcoOS_GetPLSValue(gcePLS_VALUE_EGL_DISPLAY_INFO);

        while (head != EGL_NO_DISPLAY)
        {
            VEGLDisplay display = head;

            if (display->ownerThread == gcoOS_GetCurrentThreadID())
            {
                /* This thread has not eglTerminated the display.*/
                eglTerminate(display);
            }

            head = display->next;
            if (TLS->ProcessExiting)
            {
                gcmVERIFY_OK(gcmOS_SAFE_FREE(gcvNULL, display));
                gcoOS_SetPLSValue(gcePLS_VALUE_EGL_DISPLAY_INFO, (gctPOINTER) head);
            }
        }

        TLS->context = gcvNULL;
    }

    gcmFOOTER_NO();
}
开发者ID:Astralix,项目名称:hardware_drivers,代码行数:39,代码来源:gc_egl.c


示例11: eglMakeCurrent

void GLContext::Terminate()
{
    if( display_ != EGL_NO_DISPLAY )
    {
        eglMakeCurrent( display_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
        if( context_ != EGL_NO_CONTEXT )
        {
            eglDestroyContext( display_, context_ );
        }

        if( surface_ != EGL_NO_SURFACE )
        {
            eglDestroySurface( display_, surface_ );
        }
        eglTerminate( display_ );
    }

    display_ = EGL_NO_DISPLAY;
    context_ = EGL_NO_CONTEXT;
    surface_ = EGL_NO_SURFACE;
    context_valid_ = false;

}
开发者ID:007gzs,项目名称:android-platform-ndk,代码行数:23,代码来源:GLContext.cpp


示例12: gdk_wayland_display_dispose

static void
gdk_wayland_display_dispose (GObject *object)
{
  GdkDisplayWayland *display_wayland = GDK_DISPLAY_WAYLAND (object);

  _gdk_wayland_display_manager_remove_display (gdk_display_manager_get (),
					       GDK_DISPLAY (display_wayland));
  g_list_foreach (display_wayland->input_devices,
		  (GFunc) g_object_run_dispose, NULL);

  _gdk_screen_close (display_wayland->screen);

  if (display_wayland->event_source)
    {
      g_source_destroy (display_wayland->event_source);
      g_source_unref (display_wayland->event_source);
      display_wayland->event_source = NULL;
    }

  eglTerminate(display_wayland->egl_display);

  G_OBJECT_CLASS (_gdk_display_wayland_parent_class)->dispose (object);
}
开发者ID:dieterv,项目名称:gtk,代码行数:23,代码来源:gdkdisplay-wayland.c


示例13: engine_term_display

// Tear down the EGL context currently associated with the display.
static void engine_term_display(struct engine* engine) 
{
	glDeleteTextures(1, &g_img);

    if (engine->display != EGL_NO_DISPLAY) 
	{
        eglMakeCurrent(engine->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
        if (engine->context != EGL_NO_CONTEXT) 
		{
            eglDestroyContext(engine->display, engine->context);
        }
        if (engine->surface != EGL_NO_SURFACE) 
		{
            eglDestroySurface(engine->display, engine->surface);
        }
        eglTerminate(engine->display);
    }

    engine->animating = 0;
    engine->display = EGL_NO_DISPLAY;
    engine->context = EGL_NO_CONTEXT;
    engine->surface = EGL_NO_SURFACE;
}
开发者ID:zhaozw,项目名称:pathogenandroid,代码行数:24,代码来源:main.cpp


示例14: engine_term_display

// EGL情報を破棄する
static void engine_term_display(struct engine* engine) {
  if (engine->display != EGL_NO_DISPLAY) {
    // EGLレンダリングコンテキストとEGLサーフェイスの関連を外す
    eglMakeCurrent(engine->display, 
                   EGL_NO_SURFACE, 
                   EGL_NO_SURFACE,
                   EGL_NO_CONTEXT);
    // EGLレンダリングコンテキストを破棄する
    if (engine->context != EGL_NO_CONTEXT) 
      eglDestroyContext(engine->display, engine->context);
    // EGLサーフェイスを破棄する
    if (engine->surface != EGL_NO_SURFACE) 
      eglDestroySurface(engine->display, engine->surface);
    // EGLディスプレイを破棄する
    eglTerminate(engine->display);
  }
  // アニメーション停止
  engine->animating = 0;
  // EGL関連データを破棄
  engine->display = EGL_NO_DISPLAY;
  engine->context = EGL_NO_CONTEXT;
  engine->surface = EGL_NO_SURFACE;
}
开发者ID:fukusyo,项目名称:NDKBook_2nd,代码行数:24,代码来源:main.c


示例15: wglDeleteContext

SkOSWindow::~SkOSWindow() {
#if SK_SUPPORT_GPU
    if (NULL != fHGLRC) {
        wglDeleteContext((HGLRC)fHGLRC);
    }
#if SK_ANGLE
    if (EGL_NO_CONTEXT != fContext) {
        eglDestroyContext(fDisplay, fContext);
        fContext = EGL_NO_CONTEXT;
    }

    if (EGL_NO_SURFACE != fSurface) {
        eglDestroySurface(fDisplay, fSurface);
        fSurface = EGL_NO_SURFACE;
    }

    if (EGL_NO_DISPLAY != fDisplay) {
        eglTerminate(fDisplay);
        fDisplay = EGL_NO_DISPLAY;
    }
#endif // SK_ANGLE
#endif // SK_SUPPORT_GPU
}
开发者ID:hgl888,项目名称:RuntimeCanvas,代码行数:23,代码来源:SkOSWindow_win.cpp


示例16: gst_imx_egl_viv_sink_egl_platform_shutdown_window

gboolean gst_imx_egl_viv_sink_egl_platform_shutdown_window(GstImxEglVivSinkEGLPlatform *platform)
{
	if (platform->native_window == 0)
		return TRUE;

	eglMakeCurrent(platform->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);

	if (platform->egl_context != EGL_NO_CONTEXT)
		eglDestroyContext(platform->egl_display, platform->egl_context);

	if (platform->egl_surface != EGL_NO_SURFACE)
		eglDestroySurface(platform->egl_display, platform->egl_surface);

	if (platform->egl_display != EGL_NO_DISPLAY)
		eglTerminate(platform->egl_display);

	platform->egl_display = EGL_NO_DISPLAY;
	platform->egl_context = EGL_NO_CONTEXT;
	platform->egl_surface = EGL_NO_SURFACE;
	platform->native_window = 0;

	return TRUE;
}
开发者ID:FrankBau,项目名称:gstreamer-imx,代码行数:23,代码来源:egl_platform_android.c


示例17: assert

void EGLWindow::destroyGL()
{
    if (mSurface != EGL_NO_SURFACE)
    {
        assert(mDisplay != EGL_NO_DISPLAY);
        eglDestroySurface(mDisplay, mSurface);
        mSurface = EGL_NO_SURFACE;
    }

    if (mContext != EGL_NO_CONTEXT)
    {
        assert(mDisplay != EGL_NO_DISPLAY);
        eglDestroyContext(mDisplay, mContext);
        mContext = EGL_NO_CONTEXT;
    }

    if (mDisplay != EGL_NO_DISPLAY)
    {
        eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
        eglTerminate(mDisplay);
        mDisplay = EGL_NO_DISPLAY;
    }
}
开发者ID:mariospr,项目名称:chromium-browser,代码行数:23,代码来源:EGLWindow.cpp


示例18: rect

void QEglFSWindow::create()
{
    if (m_window)
        return;

    if (window()->windowType() == Qt::Desktop) {
        QRect rect(QPoint(), hooks->screenSize());
        QPlatformWindow::setGeometry(rect);
        QWindowSystemInterface::handleGeometryChange(window(), rect);
        return;
    }

    EGLDisplay display = (static_cast<QEglFSScreen *>(window()->screen()->handle()))->display();
    QSurfaceFormat platformFormat = hooks->surfaceFormatFor(window()->requestedFormat());
    EGLConfig config = q_configFromGLFormat(display, platformFormat);
    m_format = q_glFormatFromConfig(display, config);
    m_window = hooks->createNativeWindow(hooks->screenSize(), m_format);
    m_surface = eglCreateWindowSurface(display, config, m_window, NULL);
    if (m_surface == EGL_NO_SURFACE) {
        eglTerminate(display);
        qFatal("EGL Error : Could not create the egl surface: error = 0x%x\n", eglGetError());
    }
}
开发者ID:KDE,项目名称:android-qt5-qtbase,代码行数:23,代码来源:qeglfswindow.cpp


示例19: eglDestroyContext

void X11Window::internalDestroyGLContext()
{
#ifdef OPENGL_ES
    if(m_eglDisplay) {
        if(m_eglContext) {
            eglDestroyContext(m_eglDisplay, m_eglContext);
            m_eglContext = 0;
        }
        if(m_eglSurface) {
            eglDestroySurface(m_eglDisplay, m_eglSurface);
            m_eglSurface = 0;
        }
        eglTerminate(m_eglDisplay);
        m_eglDisplay = 0;
    }
#else
    if(m_glxContext) {
        glXMakeCurrent(m_display, None, NULL);
        glXDestroyContext(m_display, m_glxContext);
        m_glxContext = 0;
    }
#endif
}
开发者ID:HeberPcL,项目名称:otclient,代码行数:23,代码来源:x11window.cpp


示例20: terminate_egl_window

void
terminate_egl_window() {

    // Typical EGL cleanup
    if (g_egl_disp != EGL_NO_DISPLAY) {
        eglMakeCurrent(g_egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
        if (g_egl_surf != EGL_NO_SURFACE) {
            eglDestroySurface(g_egl_disp, g_egl_surf);
            g_egl_surf = EGL_NO_SURFACE;
        }
        if (g_egl_ctx != EGL_NO_CONTEXT) {
            eglDestroyContext(g_egl_disp, g_egl_ctx);
            g_egl_ctx = EGL_NO_CONTEXT;
        }
        if (g_screen_win != NULL) {
            screen_destroy_window(g_screen_win);
            g_screen_win = NULL;
        }
        eglTerminate(g_egl_disp);
        g_egl_disp = EGL_NO_DISPLAY;
    }
    eglReleaseThread();
}
开发者ID:AVataRR626,项目名称:NDK-Samples,代码行数:23,代码来源:main.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ egptr函数代码示例发布时间:2022-05-30
下一篇:
C++ eglSwapInterval函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap