Re: Best way to prepare an Image
Posted by Vasilij on Feb 26, 2014; 11:04am
URL: https://forum.jogamp.org/Best-way-to-prepare-an-Image-tp4031731p4031736.html
Yeah! I found GL MediaPlayer Impl! I should take a moment to understand it.
To Bufferedimage: it is not an requirement, it is a source. I must make it (paint it, produce it) in my Thread and then display it on screen.
I make GLBuffers.newDirectByteBuffer(byte[]) and i take bytearray from BufImage. With that buffer a make Texture in this way: gl.glTexImage2D(..,..,.. buffer).
With an example in GL MediaPlayer Impl I have a chance to make an GLContex current in a thread and make texture.