Пример #1
0
//----------------------------------------------------------------------------
void PlanarShadowEffect::Load (InStream& source)
{
	WM5_BEGIN_DEBUG_STREAM_LOAD(source);

	GlobalEffect::Load(source);

	source.ReadAggregateRR(mNumPlanes, mShadowColors);
	source.ReadPointerVR(mNumPlanes, mPlanes);
	source.ReadPointerVR(mNumPlanes, mProjectors);
	source.ReadPointer(mShadowCaster);

	WM5_END_DEBUG_STREAM_LOAD(PlanarShadowEffect, source);
}
Пример #2
0
//----------------------------------------------------------------------------
void CurveMesh::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	Polysegment::Load(source);
	PX2_VERSION_LOAD(source);

	source.Read(mNumFullVertices);
	source.Read(mNumSegments);
	source.Read(mLevel);
	source.ReadBool(mAllowDynamicChange);
	source.ReadPointer(mOrigVBuffer);
	source.ReadPointer(mOrigParams);

	bool locked = (mOrigVBuffer == 0);
	if (!locked)
	{
		source.ReadPointerVR(mNumSegments, mSegments);
	}

	if (mAllowDynamicChange)
	{
		mCInfo = new1<CurveInfo>(mNumFullVertices);
		for (int i = 0; i < mNumFullVertices; ++i)
		{
			source.ReadPointer(mCInfo[i].Segment);
			source.Read(mCInfo[i].Param);
		}
	}

	PX2_END_DEBUG_STREAM_LOAD(CurveMesh, source);
}
//----------------------------------------------------------------------------
void PlanarReflectionEffect::Load (InStream& source)
{
    WM5_BEGIN_DEBUG_STREAM_LOAD(source);

    GlobalEffect::Load(source);

    source.ReadRR(mNumPlanes, mReflectances);
    source.ReadPointerVR(mNumPlanes, mPlanes);

    WM5_END_DEBUG_STREAM_LOAD(PlanarReflectionEffect, source);
}
Пример #4
0
//----------------------------------------------------------------------------
void VisualEffectInstance::Load (InStream& source)
{
    WM5_BEGIN_DEBUG_STREAM_LOAD(source);

    Object::Load(source);

    source.Read(mTechniqueIndex);
    source.ReadPointer(mEffect);
    source.ReadPointerRR(mNumPasses, mVertexParameters);
    source.ReadPointerVR(mNumPasses, mPixelParameters);

    WM5_END_DEBUG_STREAM_LOAD(VisualEffectInstance, source);
}
Пример #5
0
//----------------------------------------------------------------------------
void SkinController::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	Controller::Load(source);

	source.Read(mNumVertices);
	source.Read(mNumBones);

	int numWeightsOffsets = mNumVertices*mNumBones;
	mWeights = new2<float>(mNumBones, mNumVertices);
	mOffsets = new2<APoint>(mNumBones, mNumVertices);
	source.ReadVV(numWeightsOffsets, mWeights[0]);
	source.ReadAggregateVV(numWeightsOffsets, mOffsets[0]);

	source.ReadPointerVR(mNumBones, mBones);

	PX2_END_DEBUG_STREAM_LOAD(SkinController, source);
}
Пример #6
0
//----------------------------------------------------------------------------
void RenderTarget::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	Object::Load(source);
	PX2_VERSION_LOAD(source);

	source.Read(mNumTargets);
	source.Read(mWidth);
	source.Read(mHeight);
	source.Read(mHasMipmaps);
	source.ReadBool(mHasDepthStencil);
	source.ReadBool(mIsOnlyDepth16NoStencil);

	source.ReadPointerVR(mNumTargets, mColorTextures);
	source.ReadPointer(mDepthStencilTexture);
	source.ReadBool(mHasMipmaps);

	PX2_END_DEBUG_STREAM_LOAD(RenderTarget, source);
}
Пример #7
0
//----------------------------------------------------------------------------
void MaterialInstance::Load (InStream& source)
{
	PX2_BEGIN_DEBUG_STREAM_LOAD(source);

	Object::Load(source);
	PX2_VERSION_LOAD(source);

	source.ReadBool(mIsShareMtl);

	source.ReadString(mMaterialFilename);
	source.ReadString(mInstanceTechName);

	source.ReadPointer(mMaterial);
	source.Read(mTechniqueIndex);

	source.ReadPointerRR(mNumPasses, mVertexParameters);
	source.ReadPointerVR(mNumPasses, mPixelParameters);

	PX2_END_DEBUG_STREAM_LOAD(MaterialInstance, source);
}