예제 #1
0
파일: nanovg_bgfx.cpp 프로젝트: pplux/bgfx
void nvgluDeleteFramebuffer(NVGLUframebuffer* _framebuffer)
{
	if (_framebuffer == NULL)
	{
		return;
	}

	if (bgfx::isValid(_framebuffer->handle))
	{
		bgfx::destroy(_framebuffer->handle);
	}

	struct NVGparams* params = nvgInternalParams(_framebuffer->ctx);
	struct GLNVGcontext* gl = (struct GLNVGcontext*)params->userPtr;
	glnvg__deleteTexture(gl, _framebuffer->image);
	BX_DELETE(gl->allocator, _framebuffer);
}
예제 #2
0
void imguiShutdown()
{
    if (!gIm)
        return;

    bx::AllocatorI* alloc = gIm->alloc;

    ImGui::Shutdown();

    if (IS_VALID(gIm->uniformTexture))
        bgfx::destroyUniform(gIm->uniformTexture);
    if (IS_VALID(gIm->indexBuffer))
        bgfx::destroyDynamicIndexBuffer(gIm->indexBuffer);
    if (IS_VALID(gIm->vertexBuffer))
        bgfx::destroyDynamicVertexBuffer(gIm->vertexBuffer);
    if (IS_VALID(gIm->fontTexHandle))
        bgfx::destroyTexture(gIm->fontTexHandle);
    if (IS_VALID(gIm->progHandle))
        bgfx::destroyProgram(gIm->progHandle);

    BX_DELETE(alloc, gIm);
    gIm = nullptr;
}
예제 #3
0
	void rendererDestroy()
	{
		BX_DELETE(g_allocator, s_renderNOOP);
		s_renderNOOP = NULL;
	}
예제 #4
0
	void GlContext::destroySwapChain(SwapChainGL* _swapChain)
	{
		BX_DELETE(g_allocator, _swapChain);
	}
예제 #5
0
파일: cmd.cpp 프로젝트: Akaito/bgfx
void cmdShutdown()
{
	BX_DELETE(entry::getAllocator(), s_cmdContext);
}
예제 #6
0
	void GlContext::destroySwapChain(SwapChainGL* _swapChain)
	{
		BX_DELETE(g_allocator, _swapChain);
		glXMakeCurrent( (::Display*)g_platformData.ndt, (::Window)g_platformData.nwh, m_context);
	}