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

C++ deleteTexture函数代码示例

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

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



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

示例1: deleteShader

YUV420PGrabber::~YUV420PGrabber() {
  deleteShader(frag_y);
  deleteShader(vert_yuv);
  deleteShader(frag_u);
  deleteShader(frag_v);
  deleteShader(frag_pt);
  deleteProgram(prog_y);
  deleteProgram(prog_u);
  deleteProgram(prog_v);
  deleteProgram(prog_pt);
  deleteTexture(yuv_tex);
  deleteTexture(scene_tex);

  if(scene_fbo) {
    glDeleteFramebuffers(1, &scene_fbo);
  }

  if(scene_depth) {
    glDeleteRenderbuffers(1, &scene_depth);
  }

  if(vao) {
#if YUV420P_USE_APPLE_VAO
    glDeleteVertexArraysAPPLE(1, &vao);
#else
    glDeleteVertexArrays(1, &vao);
#endif  
  }

  if(outfile_set && ofs.is_open()) {
    ofs.close();
  }

  if(image) {
    delete[] image;
  }

  outfile_set = false;
  win_w = 0;
  win_h = 0;
  vid_w = 0;
  vid_h = 0;
  uv_w = 0;
  uv_h = 0;
  yuv_tex = 0;
  scene_fbo = 0;
  scene_depth = 0;
  scene_tex = 0;
  vao = 0;
  fps = 0;
  tex_w = 0;
  tex_h = 0;
  image = NULL;
  frame_timeout = 0;
  frame_prev_timeout = 0;
  frame_delay = 0;
  frame_delay_adjusted = 0;
  frame_diff = 0;
  frame_diff_avg = 0;
}
开发者ID:AlexSnet,项目名称:video_streamer,代码行数:60,代码来源:YUV420PGrabber.cpp


示例2: deleteTexture

 GraphicDebugger::~GraphicDebugger()
 {
     deleteTexture(m_scene.textureNode());
     deleteTexture(m_scene.textureGlow());
     deleteTexture(m_scene.textureEdge());
     //    deleteTexture(_helpDialog->texture());
 }
开发者ID:Peregring-lk,项目名称:FreeAlgView,代码行数:7,代码来源:graphic_debugger.cpp


示例3: makeCurrent

CompassWidget::~CompassWidget()
{
	makeCurrent();

	if (robotTextureFront)
		deleteTexture(robotTextureFront);

	if (robotTextureBack)
		deleteTexture(robotTextureBack);

	if (robotTextureLeft)
		deleteTexture(robotTextureLeft);

	if (robotTextureRight)
		deleteTexture(robotTextureRight);

	if (zAxisCone)
		gluDeleteQuadric (zAxisCone);

	if (yAxisCone)
		gluDeleteQuadric (yAxisCone);

	if (xAxisCone)
		gluDeleteQuadric (xAxisCone);

	if (zAxisCylinder)
		gluDeleteQuadric (zAxisCylinder);

	if (yAxisCylinder)
		gluDeleteQuadric (yAxisCylinder);

	if (xAxisCylinder)
		gluDeleteQuadric (xAxisCylinder);
}
开发者ID:markusk,项目名称:direcs,代码行数:34,代码来源:compassWidget.cpp


示例4: deleteTexture

BallsAnalyzer::~BallsAnalyzer()
{
    deleteTexture( m_ballTexture );
    deleteTexture( m_gridTexture );
    delete m_leftPaddle;
    delete m_rightPaddle;

    qDeleteAll( m_balls );
}
开发者ID:cancamilo,项目名称:amarok,代码行数:9,代码来源:BallsAnalyzer.cpp


示例5: terrainUninit

void terrainUninit()
{
    if(terrain_current->width != 256 || terrain_current->height != 256)
        deleteTexture(terrain_resized);

    if(terrain_current != &terrain)
        deleteTexture(terrain_current);

    deleteTexture(terrain_quad);
    deleteTexture(glass_big);
}
开发者ID:aviallon,项目名称:crafti,代码行数:11,代码来源:terrain.cpp


示例6: deleteTexture

MediaTexture::~MediaTexture()
{
    if (m_contentTexture)
        deleteTexture(m_contentTexture, true);
    for (unsigned int i = 0; i < m_videoTextures.size(); i++) {
        deleteTexture(m_videoTextures[i], true);
    }

    JNIEnv* env = JSC::Bindings::getJNIEnv();
    env->DeleteWeakGlobalRef(m_weakWebViewRef);
    env->DeleteWeakGlobalRef(m_weakWebViewCoreRef);
}
开发者ID:asce1062,项目名称:android_external_webkit,代码行数:12,代码来源:MediaTexture.cpp


示例7: gpuErrchk

CUDARenderer::~CUDARenderer(void)
{
	gpuErrchk(cudaFree(d_scene));
	deleteTexture();
	vao.destroy();
	vertices.destroy();
}
开发者ID:Aloalo,项目名称:RTRT,代码行数:7,代码来源:CUDARenderer.cpp


示例8: deleteTexture

void ViewPort::RenderManipulationInterface(){

    deleteTexture(m_VideoTexture);
    m_VideoTexture = bindTexture(*m_pVideoImage, GL_TEXTURE_2D, GL_RGBA);
	    
    glClear(GL_COLOR_BUFFER_BIT);
    glLoadIdentity();
    glDisable(GL_BLEND);

    // Draw main texture
    glColor4f(1.0, 1.0, 1.0, 1.0);
    glBegin(GL_QUADS);
    
    glTexCoord2f(0, 1);
    glVertex2f(0, 960);
    
    glTexCoord2f(1, 1);
    glVertex2f(1280, 960);
    
    glTexCoord2f(1, 0);
    glVertex2f(1280, 0);
    
    glTexCoord2f(0, 0);
    glVertex2f(0, 0);
    
    glEnd(); 
}
开发者ID:FlightFixit,项目名称:tip,代码行数:27,代码来源:viewport.cpp


示例9: doRedo

	bool doRedo() override
	{
		if (!created_)
			return deleteTexture();
		else
			return createTexture();
	}
开发者ID:Talon1024,项目名称:SLADE,代码行数:7,代码来源:TextureXPanel.cpp


示例10: deleteTexture

void ResourceManager::cleanup()
{
	std::cout << "################ ResourceManager::cleanup ################" << std::endl;
	// textures
	std::cout << "---------- Delete Textures ----------" << std::endl;
	std::map<std::string, Texture*>::iterator text_it;
	for (text_it=_textures.begin(); text_it!=_textures.end(); ++text_it) {
		if (text_it->second != NULL) {
			//std::cout << text_it->first << " => " << text_it->second << '\n';
			deleteTexture(text_it->first);
		}
	}
	_textures.clear();

	// meshes
	std::cout << "---------- Delete Meshes ----------" << std::endl;
	std::map<std::string, Mesh*>::iterator mesh_it;
	for (mesh_it=_meshes.begin(); mesh_it!=_meshes.end(); ++mesh_it) {
		if (mesh_it->second != NULL) {
			//std::cout << mesh_it->first << " => " << mesh_it->second << '\n';
			deleteMesh(mesh_it->first);
		}
	}
	_meshes.clear();
}
开发者ID:ThomvanDijk,项目名称:HexagonGame,代码行数:25,代码来源:resourcemanager.cpp


示例11: while

ResourceManager::~ResourceManager()
{
    while (!mBufferMap.empty())
    {
        deleteBuffer(mBufferMap.begin()->first);
    }

    while (!mProgramMap.empty())
    {
        deleteProgram(mProgramMap.begin()->first);
    }

    while (!mShaderMap.empty())
    {
        deleteShader(mShaderMap.begin()->first);
    }

    while (!mRenderbufferMap.empty())
    {
        deleteRenderbuffer(mRenderbufferMap.begin()->first);
    }

    while (!mTextureMap.empty())
    {
        deleteTexture(mTextureMap.begin()->first);
    }
}
开发者ID:hgl888,项目名称:RuntimeCanvas,代码行数:27,代码来源:ResourceManager.cpp


示例12: deleteTexture

void ImagesDisplay::load_texture(image_info *info)
{
  QImage          *ima_loaded;
  qreal                 width;
  qreal                height;

  ima_loaded = info->ima_loaded;

  if (ima_loaded == NULL)
  {  return;  }
  if (info->no_textures)
  { info->no_textures = 0;}
  else
  { deleteTexture(texture); }
  texture = bindTexture(*(ima_loaded));

  //FIXME Assert all pictures have the same dimentions in the future
  width = ima_loaded->width();
  height = ima_loaded->height();
  if (height == 0){height = 1.0;}
  image_aspect = width/height;//Aspect ratio of image

  // Set nearest filtering mode for texture minification
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

    // Set bilinear filtering mode for texture magnification
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

  // Make texture coordinates to repeat, not really useful as we will never get out of the vertex coords
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

  return;
}
开发者ID:phoenixcatdog,项目名称:adanto,代码行数:34,代码来源:imagesdisplay.cpp


示例13: cleanup

void cleanup(void)
{
    cudaGraphicsUnregisterResource(cuda_vbo_resource);

    unbindTexture();
    deleteTexture();

    // Free all host and device resources
    free(hvfield);
    free(particles);
    cudaFree(dvfield);
    cudaFree(vxfield);
    cudaFree(vyfield);
    cufftDestroy(planr2c);
    cufftDestroy(planc2r);

    glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
    glDeleteBuffersARB(1, &vbo);

    sdkDeleteTimer(&timer);

    if (g_bExitESC)
    {
        checkCudaErrors(cudaDeviceReset());
    }
}
开发者ID:Aahung,项目名称:CudaSample,代码行数:26,代码来源:fluidsGL.cpp


示例14: doUndo

	bool doUndo()
	{
		if (created)
			return deleteTexture();
		else
			return createTexture();
	}
开发者ID:Blzut3,项目名称:SLADE,代码行数:7,代码来源:TextureXPanel.cpp


示例15: doRedo

	bool doRedo()
	{
		if (!created)
			return deleteTexture();
		else
			return createTexture();
	}
开发者ID:Blzut3,项目名称:SLADE,代码行数:7,代码来源:TextureXPanel.cpp


示例16: CVF_ASSERT

//--------------------------------------------------------------------------------------------------
/// Note: Default unpack alignment (GL_UNPACK_ALIGNMENT) is 4 and 4 byte values is preferred, thus
///       we should always use RGBA when having byte textures as GPUs are optimized to 32 bit values
//--------------------------------------------------------------------------------------------------
bool Texture2D_FF::setupTexture(OpenGLContext* oglContext)
{
    CVF_ASSERT(oglContext);
    CVF_ASSERT(OglRc::safeOglId(m_oglRcTexture.p()) == 0);

    CVF_CLEAR_OGL_ERROR(oglContext);
    
    m_oglRcTexture = oglContext->resourceManager()->createOglRcTexture(oglContext);
    bind(oglContext);
    CVF_CHECK_OGL(oglContext);

    CVF_ASSERT(m_image.notNull());
    GLsizei width = static_cast<GLsizei>(m_image->width());
    GLsizei height = static_cast<GLsizei>(m_image->height());
    CVF_ASSERT(height > 0 && width > 0);
    //glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, m_image->ptr());
    // Note: gluBuild2DMipmaps will scale the image to the closest power of 2 dimension, which is required by the software renderer
    gluBuild2DMipmaps(GL_TEXTURE_2D, 4, width, height, GL_RGBA, GL_UNSIGNED_BYTE, m_image->ptr());

    if (CVF_TEST_AND_REPORT_OPENGL_ERROR(oglContext, "Setup texture"))
    {
        deleteTexture(oglContext);
        return false;
    }

    return true;
}
开发者ID:akva2,项目名称:ResInsight,代码行数:31,代码来源:cvfTexture2D_FF.cpp


示例17: deleteTexture

void PointCloudViewer::animate()
{

    deleteTexture(texid);
    texid = bindTexture(QImage(rgbImg->ptr(), rgbImg->cols, rgbImg->rows, QImage::Format_RGB888), GL_TEXTURE_2D, GL_RGB, QGLContext::LinearFilteringBindOption);

}
开发者ID:makoto1016,项目名称:PointCloud,代码行数:7,代码来源:PointCloudView.cpp


示例18: cleanUp

void cleanUp(void)
{
  /*** delete texture ***/
  deleteTexture(&tex);
  free(h_g_data);
  free_data();
}
开发者ID:Jie211,项目名称:FDTD-GLUT,代码行数:7,代码来源:FDTD2d_tm.c


示例19: keyboard

////////////////////////////////////////////////////////////////////////////////
//! Keyboard events handler
////////////////////////////////////////////////////////////////////////////////
void
keyboard( unsigned char key, int /*x*/, int /*y*/) {

    switch( key) {
    case( 27) :
        deletePBO( &pbo_source);
        deletePBO( &pbo_dest);
        deleteFBO( &fbo, &tex_fbo);
        deleteTexture( &tex_screen);
        exit( 0);
    case ' ':
        enable_cuda ^= 1;
        break;
    case 'a':
        animate ^= 1;
        break;
    case '=':
    case '+':
        if (blur_radius < 16) blur_radius++;
        printf("radius = %d\n", blur_radius);
        break;
    case '-':
        if (blur_radius > 1) blur_radius--;
        printf("radius = %d\n", blur_radius);
        break;
    }
}
开发者ID:jtarosky,项目名称:wdp,代码行数:30,代码来源:main.cpp


示例20: deleteTexture

MainWidget::~MainWidget()
{
    delete timer; timer = 0;
    delete program; program = 0;
    delete geometries; geometries = 0;

    deleteTexture(texture);
}
开发者ID:maxxant,项目名称:qt,代码行数:8,代码来源:mainwidget.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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