Пример #1
0
	Painting::Painting(ID3D11Device* device, ID3D11DeviceContext* context)
		: MeshInstance(device), texture(0), width(5.0), height(5.0)
	{
		InitTexture(context);
		TestMaterial* canvasMaterial = new TestMaterial(device);
		SetMesh(new PlaneMesh(device, width, height));
		SetMaterial(canvasMaterial);
		canvasMaterial->Init();
		SetActiveTechniqueByName("TextureTech");		
		canvasMaterial->SetTexture(texture);
	}