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

C++ eglDestroyContext函数代码示例

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

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



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

示例1: eglMakeCurrent

CTSmallWindowOpenVG::~CTSmallWindowOpenVG()
	{
	// Make sure that this egl status is active
	eglMakeCurrent(iDisplay, iSurface, iSurface, iContextVG);
    vgDestroyPaint(iFillPaint);
    vgDestroyPaint(iStrokePaint);
    vgDestroyPath(iPath);
	if (iContextVG != EGL_NO_CONTEXT)
		{
		eglDestroyContext(iDisplay,iContextVG);
		}
	if (iSurface != EGL_NO_SURFACE)
		{
		eglDestroySurface(iDisplay,iSurface);
		}	
	// Call eglMakeCurrent() to ensure the surfaces and contexts are truly destroyed. 
	eglMakeCurrent(iDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
	//eglTerminate(iDisplay);
	eglReleaseThread();
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:20,代码来源:tsmallwindowopenvg.cpp


示例2: eglMakeCurrent

void CEGLGraphicsInterface::Terminate()
    {
    if (iEglDisplay != EGL_NO_DISPLAY)
        {
        eglMakeCurrent(iEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
        if (iEglContext)
            {
            eglDestroyContext(iEglDisplay, iEglContext);
            iEglContext = EGL_NO_CONTEXT;
            }
        if (iEglSurface)
            {
            eglDestroySurface(iEglDisplay, iEglSurface);
            iEglSurface = EGL_NO_SURFACE;
            }
        eglTerminate(iEglDisplay);
        eglReleaseThread();
        iEglDisplay = EGL_NO_DISPLAY;
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:20,代码来源:eglgraphicsinterface.cpp


示例3: eglMakeCurrent

// -----------------------------------------------------------------------------
// CGameController::~CGameController
// Destructor.
// -----------------------------------------------------------------------------
//
CGameController::~CGameController()
{
    // EGL related cleanup.
    eglMakeCurrent( iEglDisplay, EGL_NO_SURFACE, 
                    EGL_NO_SURFACE, EGL_NO_CONTEXT 
                  );
    eglDestroySurface( iEglDisplay, iEglSurface );
    eglDestroyContext( iEglDisplay, iEglContext );
    
    // Destroy the RWindow.
    if( iWindow != NULL )
    {
        iWindow->SetOrdinalPosition( KOrdinalPositionSwitchToOwningWindow );
        iWindow->Close();
        delete iWindow;
        iWindow = NULL;
    }
    
    delete iWsEventReceiver;
}
开发者ID:mahaserver,项目名称:MHSVLC,代码行数:25,代码来源:gamecontroller.cpp


示例4: OpenGLES_DestroyContext

void OpenGLES_DestroyContext()
{
  if (EGL_NO_CONTEXT != es_context.eglContext)
  {
     eglDestroyContext(es_context.eglDisplay, es_context.eglContext);
     es_context.eglContext = EGL_NO_CONTEXT;
  }

  if (EGL_NO_SURFACE != es_context.eglSurface)
  {
     eglDestroySurface(es_context.eglDisplay, es_context.eglSurface);
     es_context.eglSurface = EGL_NO_SURFACE;
  }

  if (EGL_NO_DISPLAY != es_context.eglDisplay)
  {
     eglTerminate(es_context.eglDisplay);
     es_context.eglDisplay = EGL_NO_DISPLAY;
  }
}
开发者ID:gauravalgo,项目名称:Tiny2D,代码行数:20,代码来源:Tiny2D_OpenGLES.cpp


示例5: kill_GLES2

void kill_GLES2() {
	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:carlos-wong,项目名称:native,代码行数:20,代码来源:BlackberryMain.cpp


示例6: exit_func

static void exit_func(void)
// Function to be passed to atexit().
{
   // 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 );

   // release texture buffers
   free(state->tex_buf1);
   free(state->tex_buf2);
   free(state->tex_buf3);

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


示例7: eglMakeCurrent

void OpenGL::Teardown()
{
	if (eglDisplay != EGL_NO_DISPLAY) 
	{
		eglMakeCurrent( eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
		if ( eglContext != EGL_NO_CONTEXT) 
		{
			eglDestroyContext(eglDisplay, eglContext);
		}
		if ( eglSurface != EGL_NO_SURFACE) 
		{
			eglDestroySurface(eglDisplay, eglSurface);
		}
		eglTerminate(eglDisplay);
	}

	eglDisplay = EGL_NO_DISPLAY;
	eglContext = EGL_NO_CONTEXT;
	eglSurface = EGL_NO_SURFACE;
}
开发者ID:adamskubel,项目名称:AmplifyReality,代码行数:20,代码来源:OpenGL2Renderer.cpp


示例8: engine_term_display

void engine_term_display(void)
{
	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;
}
开发者ID:seishuku,项目名称:gauges,代码行数:20,代码来源:main.c


示例9: pi_deinit

void pi_deinit(void) {
    gles2_destroy();
    // Release OpenGL resources
    eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
    eglDestroySurface(display, surface);
    eglDestroyContext(display, context);
    eglTerminate(display);

    dispman_update = vc_dispmanx_update_start(0);
    vc_dispmanx_element_remove(dispman_update, dispman_element);
    vc_dispmanx_element_remove(dispman_update, dispman_element_bg);
    vc_dispmanx_update_submit_sync(dispman_update);
    vc_dispmanx_resource_delete(resource0);
    vc_dispmanx_resource_delete(resource1);
    vc_dispmanx_resource_delete(resource_bg);
    vc_dispmanx_display_close(dispman_display);

    if (VideoBuffer) free(VideoBuffer);
    VideoBuffer = 0;
}
开发者ID:alfredox123,项目名称:pifba,代码行数:20,代码来源:gp2xsdk.cpp


示例10: GAPI_ReleaseOGL_ES

void GAPI_ReleaseOGL_ES(GAPIPriv *ctx, Bool offscreen_only)
{
	if (ctx->egldpy) {
		eglMakeCurrent(ctx->egldpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);

		if (ctx->eglctx) eglDestroyContext(ctx->egldpy, ctx->eglctx);
		ctx->eglctx = 0;
		if (ctx->surface) eglDestroySurface(ctx->egldpy, ctx->surface);
		ctx->surface = 0;
		if (ctx->egldpy) eglTerminate(ctx->egldpy);
		ctx->egldpy = 0;
	}
    if (ctx->gl_bitmap) DeleteObject(ctx->gl_bitmap);
	ctx->gl_bitmap = NULL;

	if (offscreen_only) return;

    if (ctx->bitmap) DeleteObject(ctx->bitmap);
	ctx->bitmap = NULL;
}
开发者ID:bigbensk,项目名称:gpac,代码行数:20,代码来源:gapi.cpp


示例11: gst_gl_context_egl_destroy_context

static void
gst_gl_context_egl_destroy_context (GstGLContext * context)
{
  GstGLContextEGL *egl;

  egl = GST_GL_CONTEXT_EGL (context);

  gst_gl_context_egl_activate (context, FALSE);

  if (egl->egl_surface)
    eglDestroySurface (egl->egl_surface, egl->egl_display);

  if (egl->egl_context)
    eglDestroyContext (egl->egl_display, egl->egl_context);

  if (egl->egl_display) {
    eglTerminate (egl->egl_display);
    eglReleaseThread ();
  }
}
开发者ID:ystreet,项目名称:gst-plugins-gl,代码行数:20,代码来源:gstglcontext_egl.c


示例12: wl_subsurface_destroy

WaylandEGLContext::~WaylandEGLContext ()
{
    if (subsurface)
        wl_subsurface_destroy (subsurface);

    if (region)
        wl_region_destroy (region);

    if (child)
        wl_surface_destroy (child);

    if (egl_context)
        eglDestroyContext (egl_display, egl_context);

    if (egl_surface)
        eglDestroySurface (egl_display, egl_surface);

    if (egl_window)
        wl_egl_window_destroy (egl_window);
}
开发者ID:ehmry,项目名称:snes9x,代码行数:20,代码来源:gtk_wayland_egl_context.cpp


示例13: TEST_F

TEST_F(EGLCreateContextTest, BadAttributeFails) {
    // First check that we can successfully create a context
    EGLint attribs[5] = {
        EGL_CONTEXT_CLIENT_VERSION, 2,
        EGL_NONE, EGL_NONE, EGL_NONE,
    };
    mEglContext = eglCreateContext(mEglDisplay, mEglConfig, EGL_NO_CONTEXT,
            attribs);
    ASSERT_NE(mEglContext, EGL_NO_CONTEXT);
    ASSERT_EQ(eglGetError(), EGL_SUCCESS);
    ASSERT_EQ(EGL_TRUE, eglDestroyContext(mEglDisplay, mEglContext));
    mEglContext = EGL_NO_CONTEXT;

    // Now add an invalid attribute and make sure eglCreateContext fails
    attribs[2] = EGL_BAD_ATTRIBUTE; // error code, not a valid attribute
    mEglContext = eglCreateContext(mEglDisplay, mEglConfig, EGL_NO_CONTEXT,
            attribs);
    ASSERT_EQ(mEglContext, EGL_NO_CONTEXT);
    ASSERT_EQ(eglGetError(), EGL_BAD_ATTRIBUTE);
}
开发者ID:10114395,项目名称:android-5.0.0_r5,代码行数:20,代码来源:EGLCreateContext_test.cpp


示例14: gst_imx_egl_viv_sink_egl_platform_shutdown_window

gboolean gst_imx_egl_viv_sink_egl_platform_shutdown_window(GstImxEglVivSinkEGLPlatform *platform)
{
	Display *x11_display = (Display *)(platform->native_display);
	Window x11_window = (Window)(platform->native_window);

	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;

	EGL_PLATFORM_LOCK(platform);

	XSelectInput(x11_display, x11_window, 0);

	while (XPending(x11_display))
	{
		XEvent xevent;
		XNextEvent(x11_display, &xevent);
	}

	XDestroyWindow(x11_display, x11_window);

	platform->native_window = 0;

	EGL_PLATFORM_UNLOCK(platform);

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


示例15: close_ogl

static void
close_ogl (void)
{
#if defined (USE_OMX_TARGET_RPI)
    DISPMANX_UPDATE_HANDLE_T dispman_update;
#endif

    if (state->fshader) {
        glDeleteShader (state->fshader);
        glDetachShader (state->program, state->fshader);
    }

    if (state->vshader) {
        glDeleteShader (state->vshader);
        glDetachShader (state->program, state->vshader);
    }

    if (state->program)
        glDeleteProgram (state->program);

    if (state->tex)
        glDeleteTextures (1, &state->tex);

    /* 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);
    gst_object_unref (state->gst_display);

#if defined (USE_OMX_TARGET_RPI)
    dispman_update = vc_dispmanx_update_start (0);
    vc_dispmanx_element_remove (dispman_update, state->dispman_element);
    vc_dispmanx_update_submit_sync (dispman_update);
    vc_dispmanx_display_close (state->dispman_display);
#endif
}
开发者ID:ryumiel,项目名称:gst-omx,代码行数:41,代码来源:testegl.c


示例16: eglMakeCurrent

void
CAndroidGLESWindowContext::Shutdown( void )
{GUCEF_TRACE;

    if ( m_display != EGL_NO_DISPLAY )
    {
        eglMakeCurrent( m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
        if ( m_context != EGL_NO_CONTEXT )
        {
            eglDestroyContext( m_display, m_context );
        }
        if ( m_surface != EGL_NO_SURFACE )
        {
            eglDestroySurface( m_display, m_surface );
        }
        eglTerminate( m_display );
    }
    m_display = EGL_NO_DISPLAY;
    m_context = EGL_NO_CONTEXT;
    m_surface = EGL_NO_SURFACE;
}
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:21,代码来源:guidriverAndroidGLES_CAndroidGLESWindowContext.cpp


示例17: AppLog

void OpenGLRenderForm::DestroyEGL() {

	AppLog("OpenGLRenderForm::DestroyEGL()");

    if (eDisplay) {
        eglMakeCurrent(eDisplay, null, null, null);

        if (eContext) {
            eglDestroyContext(eDisplay, eContext);
            eContext = EGL_NO_CONTEXT;
        }

        if (eSurface) {
            eglDestroySurface(eDisplay, eSurface);
            eSurface = EGL_NO_SURFACE;
        }

        eglTerminate(eDisplay);
        eDisplay = EGL_NO_DISPLAY;
    }
}
开发者ID:drstrangecode,项目名称:Bada_Utility_Library,代码行数:21,代码来源:OpenGLRenderForm.cpp


示例18: clutter_backend_egl_dispose

static void
clutter_backend_egl_dispose (GObject *gobject)
{
    ClutterBackendEGL *backend_egl = CLUTTER_BACKEND_EGL (gobject);

    _clutter_events_uninit (CLUTTER_BACKEND (backend_egl));

    if (backend_egl->egl_context)
    {
        eglDestroyContext (backend_egl->edpy, backend_egl->egl_context);
        backend_egl->egl_context = NULL;
    }

    if (backend_egl->edpy)
    {
        eglTerminate (backend_egl->edpy);
        backend_egl->edpy = 0;
    }

    G_OBJECT_CLASS (clutter_backend_egl_parent_class)->dispose (gobject);
}
开发者ID:nobled,项目名称:clutter,代码行数:21,代码来源:clutter-backend-fruity.c


示例19: eglMakeCurrent

static void     _egl_done       (s52engine *engine)
// Tear down the EGL context currently associated with the display.
{
    if (engine->eglDisplay != EGL_NO_DISPLAY) {
        eglMakeCurrent(engine->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
        if (engine->eglContext != EGL_NO_CONTEXT) {
            eglDestroyContext(engine->eglDisplay, engine->eglContext);
        }
        if (engine->eglSurface != EGL_NO_SURFACE) {
            eglDestroySurface(engine->eglDisplay, engine->eglSurface);
        }
        eglTerminate(engine->eglDisplay);
    }

    //engine->animating  = 0;
    engine->eglDisplay = EGL_NO_DISPLAY;
    engine->eglContext = EGL_NO_CONTEXT;
    engine->eglSurface = EGL_NO_SURFACE;

    return;
}
开发者ID:GirishDeshpande,项目名称:S52,代码行数:21,代码来源:s52gtk2egl.c


示例20: 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:hongwd75,项目名称:NDKBook_2nd,代码行数:22,代码来源:main.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ eglDestroyImageKHR函数代码示例发布时间:2022-05-30
下一篇:
C++ eglCreateWindowSurface函数代码示例发布时间: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