Advertisement
Benjamin_Loison

void glProjection() and void initRender()

Apr 17th, 2018
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. void glProjection()
  2. {
  3.     glLoadIdentity();
  4.     glMatrixMode(GL_PROJECTION);
  5.     gluPerspective(70, (GLdouble)windowWidth / (GLdouble)windowHeight, 0.1, zfar);
  6.     glViewport(0, 0, windowWidth, windowHeight);
  7. }
  8.  
  9. void initRender()
  10. {
  11.     // SECRET
  12.  
  13.     glMatrixMode(GL_PROJECTION);
  14.     glLoadIdentity();
  15.     gluOrtho2D(0, windowWidth, 0, windowHeight);
  16.  
  17.     glDisable(GL_DEPTH_TEST);
  18.     glEnable(GL_TEXTURE_2D);
  19.     glClear(GL_COLOR_BUFFER_BIT);
  20.  
  21.     initializeGui();
  22.     renderThread = thread(&renderEvent);
  23.  
  24.     // SECRET
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement