Focus_mask issues part 2

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like, and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
jack_norton
Lemma-Class Veteran
Posts: 3922
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Focus_mask issues part 2

#1 Post by jack_norton » Fri Feb 17, 2012 2:16 pm

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.
follow me on Image Image Image Image
computer games

User avatar
jack_norton
Lemma-Class Veteran
Posts: 3922
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: Focus_mask issues part 2

#2 Post by jack_norton » Mon Feb 20, 2012 2:57 pm

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.
follow me on Image Image Image Image
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 14705
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Focus_mask issues part 2

#3 Post by PyTom » Fri Feb 24, 2012 3:02 pm

I will be investigating this over the weekend.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Code > Drama
https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 3922
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: Focus_mask issues part 2

#4 Post by jack_norton » Fri Feb 24, 2012 4:07 pm

Thanks! :)
follow me on Image Image Image Image
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 14705
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Focus_mask issues part 2

#5 Post by PyTom » Thu Mar 01, 2012 1:57 am

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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Code > Drama
https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 3922
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: Focus_mask issues part 2

#6 Post by jack_norton » Thu Mar 01, 2012 3:36 am

Cool, one less bug to worry about :)
follow me on Image Image Image Image
computer games

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]