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


C++ deleteTexture函数代码示例

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


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


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