Advertisement
Guest User

display(...)

a guest
Jul 7th, 2014
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1.         this.gl.glBindFramebuffer(GL_FRAMEBUFFER, this.frameBuffer); //The framebuffer was successfully set up and no errors happened
  2.        
  3.         this.gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  4.  
  5.         callback.render(this);  //In this case, the callback causes a single call to renderSprite(...,32,32)
  6.                     //Though nothing gets rendered into the texture
  7.         this.gl.glBindFramebuffer(GL_FRAMEBUFFER, 0);
  8.        
  9.         this.gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  10.        
  11.         //Create a new Sprite that represents the texture that was just rendered to
  12.         Texture t = new Texture(renderedTexture, ww, wh, ww, wh);
  13.         Sprite s = new Sprite(t);
  14.         //
  15.         this.renderSprite(s, 64, 32);
  16.         callback.render(this); //this time we render directly to the screen, and everything works fine ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement