Page 1 of 1

Focus_mask issues part 2

Posted: Fri Feb 17, 2012 2:16 pm
by jack_norton
Haha sorry for the thread name, but reading the other thread remembered me I had a problem too. I defined a screen with LOTS of BIG imagebuttons with focus mask:
campsite.jpg
Here works, is a bit slow but works, but on Aleema computers it doesn't recognize the focus mask at all (so even the transparent part of the sprites get focus). I am not sure what is the reason, she had problems before the 6.13.8 version (game was crashing) so maybe she doesn't have a videocard with lots of VRAM or something else.
Just thought to point out since is very different behavior using same code on two PCs.

Re: Focus_mask issues part 2

Posted: Mon Feb 20, 2012 2:57 pm
by jack_norton
Ok I was able to reproduce the bug even on my PC, is quite simple:
- if you use OpenGL the focus mask works correctly
- if you use DirectX/Angle, the focus mask is ignored and even the transparent part of the image get focus

so I think I just found a bug or at least very different behavior from GL/DX versions.

Re: Focus_mask issues part 2

Posted: Fri Feb 24, 2012 3:02 pm
by PyTom
I will be investigating this over the weekend.

Re: Focus_mask issues part 2

Posted: Fri Feb 24, 2012 4:07 pm
by jack_norton
Thanks! :)

Re: Focus_mask issues part 2

Posted: Thu Mar 01, 2012 1:57 am
by PyTom
I figured out and fixed the problem. Basically, I was using GL_BYTE, rather than GL_UNSIGNED_BYTE. GL_BYTE is basically useless, as it represents 128 rather than 256 colors per channel, so they removed it from OpenGL ES. The code, which is really simple, worked with the smaller range - but it didn't work on ES, since the call totally failed.

Took me a couple days to track it down, but it's gone now.

Re: Focus_mask issues part 2

Posted: Thu Mar 01, 2012 3:36 am
by jack_norton
Cool, one less bug to worry about :)