Window Transparency Problems

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Post Reply
Message
Author
Bluehand
Space Floater
Posts: 39
Joined: Sat Feb 21, 2015 7:47 pm

Window Transparency Problems

#1 Post by Bluehand »

Hi Everyone! Its been a while for me here. Anyway, I just downloaded the latest weekly build and have been having issues with what I think is window transparency handling in the tech screen. There appears to be a problem with the Planets window as well.
Using 0.4.5+ (build 2016-02-28.1df7cf9) on Mac OSX 10.10
FOtechtrans.png
FOtechtrans.png (237.94 KiB) Viewed 814 times
Code or patches I post are released under the CC and GPL licences in use for the FO project.

Bluehand
Space Floater
Posts: 39
Joined: Sat Feb 21, 2015 7:47 pm

Re: Window Transparency Problems

#2 Post by Bluehand »

After some more playing around I discovered its only if I have any tech enqueued that this happens, when the tech queue is empty it all goes back to normal, including the planets window.
Code or patches I post are released under the CC and GPL licences in use for the FO project.

User avatar
Vezzra
Release Manager, Design
Posts: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Window Transparency Problems

#3 Post by Vezzra »

Weird. I'm on 10.10 too, and everything works perfectly here. What are your system specs? Especially graphics subsystem.

Can you try to find out which test build introduced the issue? That too might help narrowing down the cause.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Window Transparency Problems

#4 Post by Geoff the Medio »

Narrowing it to a specific test build might not really help much, as I think these issues are due to the rendering state being left in an unexpected state after something renders itself, which causes something else later to not render properly... Really, to resolve these issues, someone who has them needs to be willing and able to go in and modify various rendering state calls and test interactively. My first attempt would be putting calls to enable/disable as appropriate all of

Code: Select all

    glEnableClientState(GL_VERTEX_ARRAY);
    glEnableClientState(GL_COLOR_ARRAY);
    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
after each

Code: Select all

    glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS);
Starting with the Render functions of whatever isn't being rendered properly. (Enable whatever isn't being enabled by the existing code.) That should hopefully reduce the impact of the previous rendering state on how something renders itself.

Bluehand
Space Floater
Posts: 39
Joined: Sat Feb 21, 2015 7:47 pm

Re: Window Transparency Problems

#5 Post by Bluehand »

I'm happy to try to figure out and address the issue, but unfortunately I don't understand what Geoff has described. The last version I played was before the 0.4.5 release. I'll check some earlier builds for the problem.
Code or patches I post are released under the CC and GPL licences in use for the FO project.

Bluehand
Space Floater
Posts: 39
Joined: Sat Feb 21, 2015 7:47 pm

Re: Window Transparency Problems

#6 Post by Bluehand »

The issue is present in the Sept 22 2015 Mac OSX build, but not Sept 14 2015 or before. Looking at the Github commits, there's a couple rendering changes that could have something to do with it, but I don't know enough to be certain.
Code or patches I post are released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Window Transparency Problems

#7 Post by Geoff the Medio »

Bluehand wrote:...I don't understand what Geoff has described.
In GG/src/DrawUtil.cpp around line 84 in the void Rectangle(...) function, try adding glDisableClientState calls so the block looks like:

Code: Select all

        glDisable(GL_TEXTURE_2D);
        glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS);
        glEnableClientState(GL_VERTEX_ARRAY);
        glDisableClientState(GL_COLOR_ARRAY);
        glDisableClientState(GL_TEXTURE_COORD_ARRAY);

Bluehand
Space Floater
Posts: 39
Joined: Sat Feb 21, 2015 7:47 pm

Re: Window Transparency Problems

#8 Post by Bluehand »

I never got around to compiling with the suggested changes, but it appears to be fixed in the latest weekly build, so thanks for the help and kodus to whoever fixed it.
Code or patches I post are released under the CC and GPL licences in use for the FO project.

Post Reply