Hello,

 

I've tried to utilize the IAvi Interface to create a material for an avi
file.

 

I've the following code running when my entity is created on the client.

 

The avi is a valid file because it complains if it can't find the file. The
file I am passing in for now was created in the engine itself using
startmovie blah avi

 

if(updateType == DATA_UPDATE_CREATED)

{

      m_hAviMaterial =
avi->CreateAVIMaterial(m_strAviMaterial,m_strAviMaterial,"GAME");

 

      if ( m_hAviMaterial != AVIMATERIAL_INVALID )

      {

            m_flAviFrameCount = avi->GetFrameCount(m_hAviMaterial);

            m_pAviMaterial = avi->GetMaterial(m_hAviMaterial);

            SetNextClientThink(CLIENT_THINK_ALWAYS);

      }

 

      if(m_pAviMaterial)

            m_pAviMaterial->AddRef();

}

 

Then in my DrawModel function I do.

 

if(m_pAviMaterial)

      modelrender->ForcedMaterialOverride(m_pAviMaterial);

 

int val = BaseClass::DrawModel(flags);

modelrender->ForcedMaterialOverride(0);

return val;

 

This does not work so to speak because I get a material on my model that is
pink checkerboard partially and the rest has no alpha. When I brought up the
console I got some artifacts from other textures showing on my model. These
artifacts seemed to be the memory for the main menu texture, and also one of
our mods hud textures as well as some random pixels.

 

I've also tried forcing the frame to some constant value every think and it
doesn't help.

 

Has anyone had any success with using this?

 

Thanks

Chris

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to