0

I am very very new to JOGL. I am trying to create a BufferedImage object(which is used in other part of my code) out of a textrure (not a Texture object but a texture with a handle, storage). In the internet so far my searches gave me results to get a trexture from BufferImage but not the other way around which is my problem.

Is there a way to do this ?? by the way the texture is generated by a Frame buffer object to which I do a off screen rendering.

I create my texture in a very stright forward way with the following steps: bindTexture Setup the properties of textrure Generate it from the data unbind the texture.

AdityaG
  • 428
  • 1
  • 3
  • 17

1 Answers1

0

You can use glReadPixels to read the FBO pixels into a byteBuffer

the answer from here does that and returns a bufferedimage: ReadPixel in Jogl

Community
  • 1
  • 1
AAB
  • 674
  • 3
  • 14
  • 27
  • Thank you. I saw that some days back. It worked but it proved to be very expensive for me as my screen changes very rapidly. Thank you again.. ! – AdityaG May 07 '13 at 18:25