Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fbo.bind();
- setUpViewport(FBO_WIDTH, FBO_HEIGHT);
- // draw stuff
- fbo.unbind();
- setUpViewport(FBO_WIDTH, FBO_HEIGHT);
- public void setUpViewport(int width, int height) {
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(50f, ((float)width) / ((float)height), 0.1f, 64f);
- glViewport(0, 0, width, height);
- glMatrixMode(GL_MODELVIEW);
- }
Add Comment
Please, Sign In to add comment