Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.gl.glBindFramebuffer(GL_FRAMEBUFFER, this.frameBuffer); //The framebuffer was successfully set up and no errors happened
- this.gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- callback.render(this); //In this case, the callback causes a single call to renderSprite(...,32,32)
- //Though nothing gets rendered into the texture
- this.gl.glBindFramebuffer(GL_FRAMEBUFFER, 0);
- this.gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- //Create a new Sprite that represents the texture that was just rendered to
- Texture t = new Texture(renderedTexture, ww, wh, ww, wh);
- Sprite s = new Sprite(t);
- //
- this.renderSprite(s, 64, 32);
- 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