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 'NotFound error in option.rpy' , 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: 4084
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 »

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
computer games

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
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 »

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
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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 »

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
Software > Drama • https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
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 »

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

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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 »

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
Software > Drama • https://www.patreon.com/renpytom

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
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 »

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

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Kocker