Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. // na początku game.cpp
  2. tex2 = Content::LoadTexture("../resources/czlowiek512.png");
  3.  
  4. sheep = Content::LoadModel("../resources/czlowiek.obj");
  5. sheep->GetMesh(0)->GetMaterial().texture = tex2;
  6.  
  7.  
  8. //po wcztaniu samego modelu, ale przed sheep->Draw();:
  9. sheep->GetMesh(0)->GetMaterial().Color = glm::vec3(0, 1, 0);
  10.  
  11.  
  12. shaderColor->GetParameter("tex")->SetValue(*sheep->GetMesh(i)->GetMaterial().texture);
  13.  
  14.  
  15.  
  16. sheep->Draw();
  17.  
  18. // u mnie nie chciala dzialac textura bo zdjece png bylo za duze, zmniejszylem do 512x512
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement