Object::Object()
{
	vertexBuffer = NULL;
	indexBuffer  = NULL;

	vertexBufferTangent = NULL;

	//vertexShader = NULL;
	//pixelShader  = NULL;

	vertex  = NULL;
	face    = NULL;
	tangent = NULL;

	isCreated  = false;
	isFinished = false;

	SetEnvmapEnable(false);
	SetCullMode(CULL_CW);
	SetTexture(NULL);
	SetLightmap(NULL);
	SetFlipNormals(false);
	SetCalculateNormals(true);
	SetEnabled(true);
	SetTransparency(BLEND_NONE);
	SetWriteZBuffer(true);
	//SetPerPixelLighting(false);

	SetScale(1, 1, 1);
	SetLocation(0, 0, 0);
	SetRotation(0, 0, 0);
}
Ejemplo n.º 2
0
void InstanceMaterialState::Load(KeyedArchive * archive, SceneFileV2 *sceneFile)
{
	if(NULL != archive)
	{
		if(archive->IsKeyExists("ims.uvoffset")) uvOffset = archive->GetVector2("ims.uvoffset");
		if(archive->IsKeyExists("ims.uvscale")) uvScale = archive->GetVector2("ims.uvscale");

		String lName = archive->GetString("ims.lightmapname");
		Texture* lTextute = (Texture *) sceneFile->GetNodeByPointer((uint64) archive->GetVariant("ims.lightmaptextute")->AsPointer());

		SetLightmap(lTextute, lName);
	}
}