sstFireworks::~sstFireworks()
{
	vsDeleteArray( m_vertexArray );
	vsDeleteArray( m_colorArray );
	vsDeleteArray( m_indexArray );
	vsDelete( m_vertexBuffer );
	vsDelete( m_colorBuffer );
	vsDelete( m_indexBuffer );
	vsDelete( m_usedList );
	vsDelete( m_unusedList );
	vsDeleteArray( m_particle );
	m_particle = NULL;
}
vpDrawable::~vpDrawable()
{
	for ( int i = 0; i < m_objectCount; i++ )
		vsDelete(m_object[i]);
	vsDeleteArray(m_object);
	//vsDelete(m_shader);
}
void
vsLocalisationTable::Deinit()
{
	vsDeleteArray( m_string );
	
	m_stringCount = 0;
}
예제 #4
0
vsPerlin::~vsPerlin()
{
	for ( int i = 0; i < m_octaveCount; i++ )
	{
		vsDelete(m_octave[i]);
	}
	vsDeleteArray(m_octave);
}
예제 #5
0
vsRenderTarget::~vsRenderTarget()
{
	for ( int i = 0; i < m_bufferCount; i++ )
	{
		vsDelete( m_texture[i] );
	}
	vsDeleteArray( m_texture );
	vsDelete( m_textureSurface );
	vsDelete( m_renderBufferSurface );
}
예제 #6
0
void
vsMeshMaker::Clear()
{
	vsDeleteArray( m_vertex );
	m_triangleCount = 0;
	for ( int i = 0; i < m_internalData->m_materialCount; i++ )
	{
		vsDelete( m_internalData->m_material[i] );
	}
	m_internalData->m_materialCount = 0;
	for ( int i = 0; i < MAX_MESH_MAKER_MATERIALS; i++ )
	{
		m_internalData->m_materialTriangle[i].clear();
	}
}
예제 #7
0
vsRenderPipelineStageBloom::~vsRenderPipelineStageBloom()
{
	vsDelete( m_hipassMaterial );
	for ( int i = 0; i < m_passCount; i++ )
	{
		vsDelete( m_passes[i].m_horizontalBlurMaterial );
		vsDelete( m_passes[i].m_verticalBlurMaterial );
		vsDelete( m_passes[i].m_combinePassMaterial );
	}
	vsDeleteArray( m_passes );
	vsDelete( m_fromMaterial );
	vsDelete( m_vertices );
	vsDelete( m_indices );
	vsDelete( m_bloomBlurShader );
}
예제 #8
0
vsMeshMaker::~vsMeshMaker()
{
	//vsDeleteArray( m_cell );
	vsDelete( m_octree );
	vsDeleteArray( m_vertex );
	for ( int i = 0; i < MAX_MESH_MAKER_MATERIALS; i++ )
	{
		m_internalData->m_materialTriangle[i].clear();
		//vsDeleteArray( m_internalData->m_materialTriangle[i] );
	}
	for ( int i = 0; i < m_internalData->m_materialCount; i++ )
	{
		vsDelete( m_internalData->m_material[i] );
	}
	vsDelete( m_internalData );
}
예제 #9
0
vsSurface::~vsSurface()
{
	for ( int i = 0; i < m_textureCount; i++ )
	{
		if ( m_isRenderbuffer )
		{
			glDeleteRenderbuffers(1, &m_texture[i]);
			CheckGLError("vsSurface");
		}
		else
		{
			// really shouldn't delete this;  we have a texture that's using this and will delete it itself.
			//glDeleteTextures(1, &m_texture[i]);
		}
	}
	if ( m_depth )
	{
		glDeleteRenderbuffers(1, &m_depth);
		CheckGLError("vsSurface");
	}
	glDeleteFramebuffers(1, &m_fbo);
	CheckGLError("vsSurface");
	vsDeleteArray(m_texture);
}
예제 #10
0
vsDisplayList *
vsDisplayList::Load_Obj( const vsString &filename )
{
	int vertCount = 0;
	int faceIndexCount = 0;
	vsDisplayList *loader = new vsDisplayList(1024 * 200);	// 50k should be enough to load in just about anything.  (famous  last words)

	vsFile *file = new vsFile(filename + vsString(".obj"));
	vsRecord r;

	vsString faceStr("f");
	vsString vertStr("v");

	while( file->Record(&r) )
	{
		vsString label = r.GetLabel().AsString();

		if ( label == vertStr )
			vertCount++;
		if ( label == faceStr )
			faceIndexCount+=3;
	}

	file->Rewind();

	vsVector3D *vertexPos = new vsVector3D[vertCount];
	int *triangleIndex = new int[faceIndexCount];

	int v = 0;
	int f = 0;

	while( file->Record(&r) )
	{
		vsString label = r.GetLabel().AsString();

		if ( label == vertStr )
			vertexPos[v++].Set(r.GetToken(0).AsFloat(), -r.GetToken(1).AsFloat(), 0.f);
		if ( label == faceStr )
		{
			triangleIndex[f++] = r.GetToken(0).AsInteger()-1;
			triangleIndex[f++] = r.GetToken(1).AsInteger()-1;
			triangleIndex[f++] = r.GetToken(2).AsInteger()-1;
		}
	}

	loader->VertexArray( vertexPos, vertCount );
	loader->TriangleListArray( triangleIndex, faceIndexCount );

	delete file;

	vsAssert(loader->GetSize() > 0, "Didn't get any operations in a loaded display list!" )
	vsLog("Display list is %d bytes", loader->GetSize());
	vsDisplayList *result = new vsDisplayList( loader->GetSize() );
	result->Append(*loader);
	delete loader;

	vsDeleteArray(vertexPos);
	vsDeleteArray(triangleIndex);

	return result;
}
예제 #11
0
vsRenderQueue::~vsRenderQueue()
{
	vsDeleteArray( m_stage );
	vsDelete( m_genericList );
}