Hello all,
For simplify, i have an Image with
- A java ByteBuffer containing pixels
- A render context giving an OpenGL Texture ID (if this image was already used by an OpenGL process)
So, now i want to be able to render on it and get back pixels buffer.
I would do a things like it (on general idea)
- Bind a texture from this image if it’s not already done
- Generate an FBO
- Bind the FBO to the texture (or draw the texture on the FBO)
- Bind the FBO
- *** draw ***
- delete the FBO (i assume that the result is directly on the texture ???)
So after all, i want to mark the image as “Dirty” that mean the ByteBuffer is not up to date.
If in java i try a getBuffer(), i want to be able:
- Get Back pixels buffer from the texture
So, i’m newbie in OpenGL, and i’m not sure that this procedure can be done as is.
Is a good way ? i don’t sure that FBO can be used like it ?
So if you can advise me on how to achieve this, it will be really usefull.
For more explanation, I would be able to do an API for drawing on an image in the same way if i draw on the screen.
Thanks in advance.
Sébastien.