Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
For my non regression tests, I want to compare the TextureData of an offscreen chart with TextureData loaded from a png file.
Long time ago I used BufferedImage.getRGB(x,y) but it is AWT dependent and I would prefer to rely on the genericity of JOGL. However I can't find an equivalent of getRGB or getRGBA on TextureData, neither on Texture. What would you suggest to do so? Thanks |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Hi
You can use getBuffer() but such a comparison would work if and only if both instances of TextureData use the same color space, the same pixel format, etc.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi again, Not sure Buffer offers such an interface (getRGB(x,y)) lead to which as no getRGB 2015-10-16 15:34 GMT+02:00 gouessej [via jogamp] <[hidden email]>: Hi |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
You have to read the data in this buffer, sorry :s The RGB(A) components are stored into this buffer for sure.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by Martin
I have a class with a method to get the RGBA value from the byte buffer, I plan to move it into Ardor3D. Are you still interested in this feature?
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Yes, this is an interesting thing to share, thank you Julien.
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
It's currently called ImageHelper. It allowed me to drop AWT typically when I wanted to modify the image data of a texture before sending it anew to the GPU. I'll copy it into JogAmp's Ardor3D Continuation next week.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by Martin
Done:
https://github.com/gouessej/Ardor3D/commit/9b8b30718a8b82221d1a75e4dce23dea8a19836c In my humble opinion, those methods should be moved into JOGL itself, a texture data object should be able to tell which color is in each of its pixels.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I agree with you. Thank you for sharing. 2015-11-02 22:00 GMT+01:00 gouessej [via jogamp] <[hidden email]>: Done: |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Free forum by Nabble | Edit this page |