Guest User

Untitled

a guest
Jul 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1.         fbo.bind();
  2.         setUpViewport(FBO_WIDTH, FBO_HEIGHT);
  3.         // draw stuff
  4.         fbo.unbind();
  5.         setUpViewport(FBO_WIDTH, FBO_HEIGHT);
  6.  
  7.     public void setUpViewport(int width, int height) {
  8.         glMatrixMode(GL_PROJECTION);
  9.         glLoadIdentity();
  10.         gluPerspective(50f, ((float)width) / ((float)height), 0.1f, 64f);
  11.         glViewport(0, 0, width, height);
  12.         glMatrixMode(GL_MODELVIEW);
  13.     }
Add Comment
Please, Sign In to add comment