[android-developers] Re: How to transform a openGL object into a bitmap?

2011-11-16 Thread Streets Of Boston
Looks like colors are inversed. Probably an issue with this part: int pb = (pix >> 16) & 0xff; int pr = (pix << 16) & 0x00ff; int pix1 = (pix & 0xff00ff00) | pr | pb; Try swapping the red and blue channels: int p*r* = (pix >> 16) & 0xff; int p*b* = (pix << 16) & 0x00ff; int pix1

[android-developers] Re: How to transform a openGL object into a bitmap?

2011-11-16 Thread saex
I tryed it but your function haves some kind of problem I'm displaying a square with a colored textue similar to the old icon of windows paint software "paintbrust". And when i store the opengl capture into a bitmap (bmp or png), the colours of the texture are changed :S for example, yellow colour

[android-developers] Re: How to transform a openGL object into a bitmap?

2011-11-15 Thread Streets Of Boston
Just try it out! Use (x,y) and (w,h) to render only a portion of your screen into a bitmap. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this

[android-developers] Re: How to transform a openGL object into a bitmap?

2011-11-15 Thread saex
Please, can you tell me wich parameters i have to pass to your function? int x, int y, int w, int h wich parameters i have tu put there?¿ Thanks On Nov 15, 3:05 pm, Streets Of Boston wrote: > Maybe you could use > this:https://groups.google.com/d/msg/android-developers/OGuoxpX20Ag/pr2FSe.

[android-developers] Re: How to transform a openGL object into a bitmap?

2011-11-15 Thread Streets Of Boston
Maybe you could use this: https://groups.google.com/d/msg/android-developers/OGuoxpX20Ag/pr2FSeDYfigJ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe fr