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


C++ GLSLShader::DeleteShaderProgram方法代码示例

本文整理汇总了C++中GLSLShader::DeleteShaderProgram方法的典型用法代码示例。如果您正苦于以下问题:C++ GLSLShader::DeleteShaderProgram方法的具体用法?C++ GLSLShader::DeleteShaderProgram怎么用?C++ GLSLShader::DeleteShaderProgram使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GLSLShader的用法示例。


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

示例1: OnShutdown

//release all allocated resources
void OnShutdown() {

	glDeleteTextures(1, &shadowMapTexID);

	//Destroy shader
	shader.DeleteShaderProgram();
	flatshader.DeleteShaderProgram();

	//Destroy vao and vbo
	glDeleteBuffers(1, &sphereVerticesVBO);
	glDeleteBuffers(1, &sphereIndicesVBO);
	glDeleteVertexArrays(1, &sphereVAOID);

	glDeleteBuffers(1, &cubeVerticesVBO);
	glDeleteBuffers(1, &cubeIndicesVBO);
	glDeleteVertexArrays(1, &cubeVAOID);

	glDeleteBuffers(1, &planeVerticesVBO);
	glDeleteBuffers(1, &planeIndicesVBO);
	glDeleteVertexArrays(1, &planeVAOID);

	glDeleteVertexArrays(1, &lightVAOID);
	glDeleteBuffers(1, &lightVerticesVBO);

	glDeleteFramebuffers(1,&fboID);

	cout<<"Shutdown successfull"<<endl;
}
开发者ID:bagobor,项目名称:opengl33_dev_cookbook_2013,代码行数:29,代码来源:main.cpp

示例2: OnShutdown

//release all allocated resources here
void OnShutdown() {
	//delete all textures
	size_t total_textures = materialMap.size();
	for(size_t i=0;i<total_textures;i++) {
		if(materialNames[i].length()>0)
			glDeleteTextures(1, &materialMap[materialNames[i]]);
	}
	materialNames.clear();
	materialMap.clear();
	submeshes.clear();
	vertices.clear();
	indices.clear();
	skeleton.clear();
	animations.clear();

	dualQuaternions.clear();
	animatedXform.clear();
	skeleton.clear();
	bindPose.clear();
	invBindPose.clear();

	//Destroy shader
	shader.DeleteShaderProgram();
	flatShader.DeleteShaderProgram();

	//Destroy vao and vbo
	glDeleteBuffers(1, &vboVerticesID);
	glDeleteBuffers(1, &vboIndicesID);
	glDeleteVertexArrays(1, &vaoID);

	glDeleteVertexArrays(1, &lightVAOID);
	glDeleteVertexArrays(1, &lightVerticesVBO);

	cout<<"Shutdown successfull"<<endl;
}
开发者ID:mattbti,项目名称:OpenGL,代码行数:36,代码来源:main.cpp

示例3: OnShutdown

//release all allocated resources
void OnShutdown() {
	shader.DeleteShaderProgram();
	glDeleteVertexArrays(1, &volumeMarcherVAO);
	glDeleteBuffers(1, &volumeMarcherVBO);

	delete grid;
	delete marcher;
	cout<<"Shutdown successfull"<<endl;
}
开发者ID:RebelliousX,项目名称:opengl33_dev_cookbook_2013,代码行数:10,代码来源:main.cpp

示例4: OnShutdown

//release all allocated resources
void OnShutdown() {
	//Destroy shader
	shader.DeleteShaderProgram();
	cubemapShader.DeleteShaderProgram();

	//Destroy vao and vbo
	glDeleteBuffers(1, &sphereVerticesVBO);
	glDeleteBuffers(1, &sphereIndicesVBO);
	glDeleteVertexArrays(1, &sphereVAOID);

	delete grid;
	delete cube;

	glDeleteTextures(1, &dynamicCubeMapID);


	glDeleteFramebuffers(1, &fboID);
	glDeleteRenderbuffers(1, &rboID);
	cout<<"Shutdown successfull"<<endl;
}
开发者ID:EiffelOberon,项目名称:opengl33_dev_cookbook_2013,代码行数:21,代码来源:main.cpp

示例5: OnShutdown

//delete all allocated resources
void OnShutdown() {
	//Destroy shader
	shader.DeleteShaderProgram();

	//Destroy vao and vbo
	glDeleteBuffers(1, &vboVerticesID);
	glDeleteBuffers(1, &vboIndicesID);
	glDeleteVertexArrays(1, &vaoID);

	cout<<"Shutdown successfull"<<endl;
}
开发者ID:bagobor,项目名称:opengl33_dev_cookbook_2013,代码行数:12,代码来源:main.cpp

示例6: OnShutdown

//release all allocated resources
void OnShutdown() {
    shader.DeleteShaderProgram();

    glDeleteVertexArrays(1, &cubeVAOID);
    glDeleteBuffers(1, &cubeVBOID);
    glDeleteBuffers(1, &cubeIndicesID);

    glDeleteTextures(1, &textureID);
    delete grid;
    cout<<"Shutdown successfull"<<endl;
}
开发者ID:virrkharia,项目名称:opengl33_dev_cookbook_2013,代码行数:12,代码来源:main.cpp

示例7: OnShutdown

//release all allocated resources
void OnShutdown() {

	glDeleteVertexArrays(1, &quadVAOID);
	glDeleteBuffers(1, &quadVBOID);
	glDeleteBuffers(1, &quadIndicesID);

	//delete all textures
	glDeleteTextures(1, &textureID);

	//delete all meshes
	size_t total_meshes = meshes.size();
	for(size_t i=0;i<total_meshes;i++) {
		delete meshes[i];
		meshes[i]=0;
	}
	meshes.clear();

	size_t total_materials = materials.size();
	for( size_t i=0;i<total_materials;i++) {
		delete materials[i];
		materials[i] = 0;
	}
	materials.clear();

	//Destroy shader
	shader.DeleteShaderProgram();
	raytraceShader.DeleteShaderProgram();
	flatShader.DeleteShaderProgram();

	//Destroy vao and vbo
	glDeleteBuffers(1, &vboVerticesID);
	glDeleteBuffers(1, &vboIndicesID);
	glDeleteVertexArrays(1, &vaoID);

	glDeleteVertexArrays(1, &lightVAOID);
	glDeleteBuffers(1, &lightVerticesVBO);

	glDeleteTextures(1, &texVerticesID);
	glDeleteTextures(1, &texTrianglesID);
	cout<<"Shutdown successfull"<<endl;
}
开发者ID:mattbti,项目名称:OpenGL,代码行数:42,代码来源:main.cpp

示例8: OnShutdown

//release all allocated resources
void OnShutdown() {
	cubeShader.DeleteShaderProgram();
	frontPeelShader.DeleteShaderProgram();
	blendShader.DeleteShaderProgram();
	finalShader.DeleteShaderProgram();

	shutdownFBO();
	glDeleteQueries(1, &queryId);

	glDeleteVertexArrays(1, &quadVAOID);
	glDeleteBuffers(1, &quadVBOID);
	glDeleteBuffers(1, &quadIndicesID);

	glDeleteVertexArrays(1, &cubeVAOID);
	glDeleteBuffers(1, &cubeVBOID);
	glDeleteBuffers(1, &cubeIndicesID);


	delete grid;
	cout<<"Shutdown successfull"<<endl;
}
开发者ID:bagobor,项目名称:opengl33_dev_cookbook_2013,代码行数:22,代码来源:main.cpp

示例9: OnShutdown

//delete all allocated objects
void OnShutdown() {
	X.clear();
	X_last.clear();
	F.clear();
	indices.clear();
	springs.clear();

	glDeleteQueries(1, &query);
	glDeleteQueries(1, &t_query);

	glDeleteTextures( 2, texPosID);
	glDeleteTextures( 2, texPrePosID);

	glDeleteVertexArrays(2, vaoUpdateID);
	glDeleteVertexArrays(2, vaoRenderID);
	glDeleteVertexArrays(1, &clothVAOID);
	glDeleteVertexArrays(1, &gridVAOID);
	glDeleteVertexArrays(1, &sphereVAOID);

	glDeleteBuffers( 1, &gridVBOVerticesID);
	glDeleteBuffers( 1, &gridVBOIndicesID);
	glDeleteBuffers( 1, &clothVBOVerticesID);
	glDeleteBuffers( 1, &clothVBOIndicesID);
	glDeleteBuffers( 1, &sphereVerticesID);
	glDeleteBuffers( 1, &sphereIndicesID);

    glDeleteBuffers( 2, vboID_Pos);
	glDeleteBuffers( 2, vboID_PrePos);
	glDeleteBuffers( 1, &vboIndices);

	glDeleteTransformFeedbacks(1, &tfID);
	renderShader.DeleteShaderProgram();
	massSpringShader.DeleteShaderProgram();
	particleShader.DeleteShaderProgram();
	printf("Shutdown successful");
}
开发者ID:bagobor,项目名称:opengl33_dev_cookbook_2013,代码行数:37,代码来源:main.cpp


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