コード例 #1
0
void CD3D9CgUniformSampler2D::update(const float* pData, const SMaterial& pMaterial) const
{
	int LayerID = (int)*pData;

	if (pMaterial.TextureLayer[LayerID].Texture)
	{
		IDirect3DBaseTexture9* Texture = reinterpret_cast<irr::video::CD3D9Texture*>(pMaterial.TextureLayer[LayerID].Texture)->getDX9Texture();

		cgD3D9SetTextureParameter(Parameter, Texture);
	}
}
コード例 #2
0
void CD3D9CgUniformSampler2D::update(const void* data, const SMaterial& material) const
{
	s32* Data = (s32*)data;
	s32 LayerID = *Data;

	if (material.TextureLayer[LayerID].Texture)
	{
		IDirect3DBaseTexture9* Texture = reinterpret_cast<irr::video::CD3D9Texture*>(material.TextureLayer[LayerID].Texture)->getDX9Texture();

		cgD3D9SetTextureParameter(Parameter, Texture);
	}
}