daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Mar 5th, 2016 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void ModelClass::UpdateObject(bool Render,bool InsideTexturing, ID3D11Device *device, std::string ID, XMFLOAT3 position, XMFLOAT3 rotation, XMFLOAT3 scale, char* ObjectDataLocation, LPCWSTR texture, int PixelShaderNumber, int VertexShaderNumber)
  2. {
  3.     XMFLOAT3 test, test1;
  4.    
  5.  
  6.     ID3D11ShaderResourceView *m_texture;
  7.     for (int i = 0; i < ObjectDatas.size(); i++)
  8.     {
  9.  
  10.         if (ObjectDatas[i].ID == ID)
  11.         {
  12.            
  13.             if (ObjectDatas[i].pos.x != position.x && ObjectDatas[i].pos.y != position.y && ObjectDatas[i].pos.z != position.z)
  14.             {
  15.                 ObjectDatas[i].pos = position;
  16.             }
  17.            
  18.             if (ObjectDatas[i].rotation.x != rotation.x && ObjectDatas[i].rotation.y != rotation.y && ObjectDatas[i].rotation.z != rotation.z)
  19.             {
  20.                 ObjectDatas[i].rotation = rotation;
  21.             }
  22.             if (ObjectDatas[i].scale.x != scale.x && ObjectDatas[i].scale.y != scale.y && ObjectDatas[i].scale.z != scale.z)
  23.             {
  24.                 ObjectDatas[i].scale = scale;
  25.             }
  26.             if (ObjectDatas[i].ObjectDataLocation != ObjectDataLocation)
  27.             {
  28.                 ObjectDatas[i].ObjectDataLocation = ObjectDataLocation;
  29.             }
  30.             if (ObjectDatas[i].Render != Render)
  31.             {
  32.                 ObjectDatas[i].Render = Render;
  33.             }
  34.             if (ObjectDatas[i].InsideTexturing != InsideTexturing)
  35.             {
  36.                 ObjectDatas[i].InsideTexturing = InsideTexturing;
  37.             }
  38.             if (ObjectDatas[i].PixelShaderNumber != PixelShaderNumber)
  39.             {
  40.                 ObjectDatas[i].PixelShaderNumber = PixelShaderNumber;
  41.             }
  42.             if (ObjectDatas[i].VertexShaderNumber != VertexShaderNumber)
  43.             {
  44.                 ObjectDatas[i].VertexShaderNumber = VertexShaderNumber;
  45.             }
  46.             if (ObjectDatas[i].texturelocation != texture)
  47.             {
  48.                 D3DX11CreateShaderResourceViewFromFile(device, texture, NULL, NULL, &m_texture, NULL);
  49.                 ObjectDatas[ArrayCount].texture = m_texture;
  50.                
  51.                 m_texture = NULL;
  52.             }
  53.         }
  54.     }
  55.  
  56.  
  57.    
  58.  
  59. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top