Advertisement
historic_bruno

Untitled

Oct 18th, 2013
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.20 KB | None | 0 0
  1.  source/graphics/LOSTexture.cpp | 27 +++++++++++++++++++++++++--
  2.  1 file changed, 25 insertions(+), 2 deletions(-)
  3.  
  4. diff --git a/source/graphics/LOSTexture.cpp b/source/graphics/LOSTexture.cpp
  5. index e2b8d07..00b92df 100644
  6. --- a/source/graphics/LOSTexture.cpp
  7. +++ b/source/graphics/LOSTexture.cpp
  8. @@ -154,13 +154,36 @@ void CLOSTexture::InterpolateLOS()
  9.     glPushAttrib(GL_VIEWPORT_BIT);
  10.     glViewport(0, 0, m_TextureSize, m_TextureSize);
  11.    
  12. -   glBegin(GL_QUADS);
  13. +   float vert[] = {
  14. +       1.0f, 1.0f,
  15. +       -1.0f, 1.0f,
  16. +       -1.0f, -1.0f,
  17. +
  18. +       -1.0f, -1.0f,
  19. +       1.0f, -1.0f,
  20. +       1.0f, 1.0f
  21. +   };
  22. +   float tex[] = {
  23. +       1.0f, 1.0f,
  24. +       0.0f, 1.0f,
  25. +       0.0f, 0.0f,
  26. +
  27. +       0.0f, 0.0f,
  28. +       1.0f, 0.0f,
  29. +       1.0f, 1.0f,
  30. +   };
  31. +   shader->TexCoordPointer(GL_TEXTURE0, 2, GL_FLOAT, 0, tex);
  32. +   shader->VertexPointer(2, GL_FLOAT, 0, vert);
  33. +   shader->AssertPointersBound();
  34. +   glDrawArrays(GL_TRIANGLES, 0, 6);
  35. +
  36. +   /*glBegin(GL_QUADS);
  37.         glColor4f(1.f, 1.f, 1.f, 1.f);
  38.         glTexCoord2f(1.0, 1.0); glVertex2f(1,1);
  39.         glTexCoord2f(0.0, 1.0); glVertex2f(-1,1);      
  40.         glTexCoord2f(0.0, 0.0); glVertex2f(-1,-1);
  41.         glTexCoord2f(1.0, 0.0); glVertex2f(1,-1);
  42. -   glEnd();
  43. +   glEnd();*/
  44.    
  45.     glPopAttrib();
  46.  #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement