本文整理汇总了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;
}
示例2: deleteTexture
GraphicDebugger::~GraphicDebugger()
{
deleteTexture(m_scene.textureNode());
deleteTexture(m_scene.textureGlow());
deleteTexture(m_scene.textureEdge());
// deleteTexture(_helpDialog->texture());
}
示例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);
}
示例4: deleteTexture
BallsAnalyzer::~BallsAnalyzer()
{
deleteTexture( m_ballTexture );
deleteTexture( m_gridTexture );
delete m_leftPaddle;
delete m_rightPaddle;
qDeleteAll( m_balls );
}
示例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);
}
示例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);
}
示例7: gpuErrchk
CUDARenderer::~CUDARenderer(void)
{
gpuErrchk(cudaFree(d_scene));
deleteTexture();
vao.destroy();
vertices.destroy();
}
示例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();
}
示例9: doRedo
bool doRedo() override
{
if (!created_)
return deleteTexture();
else
return createTexture();
}
示例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();
}
示例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);
}
}
示例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;
}
示例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());
}
}
示例14: doUndo
bool doUndo()
{
if (created)
return deleteTexture();
else
return createTexture();
}
示例15: doRedo
bool doRedo()
{
if (!created)
return deleteTexture();
else
return createTexture();
}