//! Adds a billboard.
void BillboardManager::AddBillboard(Graphics* pGraphics, BillboardVertex* billboard)
{
    static int id = 0;
    billboard->Id = id++;
    mBillboardList.push_back(billboard);
    BuildVertexBuffer(pGraphics->GetDevice());
}
Пример #2
0
void ParticleSystem::Initialize(ID3D10Device* lDevice, char* lFilename, UINT maxParticles, UINT lStructSize)
{
	mDevice = lDevice;
	mShaderObject->Initialize(mDevice, lFilename, D3D10_SHADER_ENABLE_STRICTNESS);

	mMaxParticles = maxParticles;
	BuildRandomTexture();
	BuildVertexBuffer(lStructSize);
}
Пример #3
0
bool InitDirect3DApp::Init()
{
	if(!D3DApp::Init())
		return false;

	// Set up the vertex and index buffers for the shape we are drawing
	BuildVertexBuffer();
	BuildIndexBuffer();
	BuildEffect();
	BuildVertexLayout();

	return true;
}
Пример #4
0
NzSkyboxBackground::NzSkyboxBackground()
{
	if (!s_indexBuffer)
		s_indexBuffer = BuildIndexBuffer();

	if (!s_shader)
		s_shader = BuildShader();

	if (!s_vertexBuffer)
		s_vertexBuffer = BuildVertexBuffer();

	m_indexBuffer = s_indexBuffer;
	m_sampler.SetWrapMode(nzSamplerWrap_Clamp); // Nécessaire pour ne pas voir les côtés
	m_shader = s_shader;
	m_vertexBuffer = s_vertexBuffer;
}
Пример #5
0
	void ExplosionSystem::BuildVertexBuffer()
	{
		for (auto it = MistVector.begin(); it != MistVector.end(); it++)
			it->first.BuildVertexBuffer();

		for (auto it = BurstVector.begin(); it != BurstVector.end(); it++)
			it->first.BuildVertexBuffer();

		for (auto it = ShockwaveVector.begin(); it != ShockwaveVector.end(); it++)
			it->first.BuildVertexBuffer();

		for (auto it = FlashVector.begin(); it != FlashVector.end(); it++)
			it->first.BuildVertexBuffer();

		for (auto it = SparksVector.begin(); it != SparksVector.end(); it++)
			it->first.BuildVertexBuffer();

		for (auto it = TrailSystemVector.begin(); it != TrailSystemVector.end(); it++)
			it->BuildVertexBuffer();

		for (auto it = DebrisVector.begin(); it != DebrisVector.end(); it++)
			it->first.BuildVertexBuffer();

	}