Пример #1
0
// очистка OpenGL
void GLWindowClear(const GLWindow *window)
{
	ASSERT(window);

	MeshDestroy(mesh);

	ShaderProgramDestroy(shaderProgram);
}
Пример #2
0
PRIVATE void _destroyMdl(hMDL *model) //this will destroy the model, will not search list
{
	if(*model)
	{
		MeshDestroy(&(*model)->mesh);

		if((*model)->frames)
		{
			for(int i = 0; i < (*model)->numFrames; i++)
				MeshDestroy(&(*model)->frames[i].frameMesh);

			GFX_FREE((*model)->frames);
		}

		if((*model)->textures)
		{
			for(int i = 0; i < (*model)->numMaterial; i++)
				TextureDestroy(&(*model)->textures[i]);
			
			GFX_FREE((*model)->textures);
		}

		if((*model)->materials)
			GFX_FREE((*model)->materials);

		if((*model)->joints)
		{
			for(int i = 0; i < (*model)->numJoints; i++)
				JointDestroy(&(*model)->joints[i]);

			GFX_FREE((*model)->joints);
		}

		GFX_FREE(*model);

		model=0;
	}
}