Opened 10 years ago

Closed 9 years ago

#2833 closed defect (fixed)

[Integrated graphics] GUI breaks when hovering water inside the SoD

Reported by: Itms Owned by: philip
Priority: Must Have Milestone: Alpha 18
Component: Core engine Keywords:
Cc: wraitii Patch:

Description (last modified by Itms)

This is a glitch I experienced scarcely and I always thought it was me messing with my windows, but I found a way to reproduce it.

Just open a map like Greek Acropolis (2) and move the camera to the right-bottom corner of the map. The GUI should break (you won't see texts, some icons, some bars, etc.). (Screenshot here https://i.imgur.com/1h4lvRa.jpg or in the duplicate #2883)

I had some time to bisect this, because it didn't happen in Patañjali, and it seems that r15576 is the cause of this. This seems to happen whenever one hovers water that is inside the SoD.

As wraitii is away atm, and other people are working on other bugs, I'll try to correct this myself. If someone knows more (CCing wraitii), tell me (or even fix it)! Does anyone other than me experience it?

Change History (17)

comment:1 by Niek, 10 years ago

What watersettings did you enable?

comment:2 by Itms, 10 years ago

Description: modified (diff)
Summary: GUI breaks when moving the camera to the right-bottom edge of the mapGUI breaks when hovering water inside the SoD

That happens with default settings, and it doesn't happen when I enable "Prefer GLSL".

Last edited 10 years ago by Itms (previous) (diff)

comment:3 by Itms, 10 years ago

Well, I tracked down the offending code, and the code "causing" the problem is not offending at all, it's just opengl textures bindings.

niektb, on Windows, and leper and mimo on Linux couldn't reproduce that, so I finally thought of testing my hardware. The problem happens with my Intel integrated graphics, but... not with my nVIDIA one!

This bug is probably something we cannot fix ourselves, however we should find a way to handle that, for many A17 users will have such hardware (and possibly won't have the dedicated graphics card that could solve the problem...)

comment:4 by Itms, 10 years ago

Summary: GUI breaks when hovering water inside the SoD[Integrated graphics] GUI breaks when hovering water inside the SoD

comment:5 by Stan, 10 years ago

I have been fixing (and also failing to fix) a lot of issues with people with switchable graphics nvidia optimus/enduro(AMD) Some programs seems to run better on the discrete while some won't do anything at all unless you set them to the integrated (ie : Windows 8.1 Apps)  So I guess for now we could ask user to use the integrated (and provide a how to) but warn them they won't be able to set the graphics on high... which is lame. 

There are options in those drivers that you can set to (Maximize performance) however it will reduce battery life. I don't know if there is a way to tell the computer he needs to use the other card. From my little knowledge I can tell you that there are profiles (Px profiles for AMD), that have a list of apps. Maybe ask the manufacturer to add your games. For Instance 0ad is known on the Gaming Evolved App, but has no settings options (Cause we didn't provide them with some). Maybe getting the game to be recognized could help in the future if there is no coding way to do it.

comment:6 by Itms, 10 years ago

No, the problem happens with integrated graphics, not the contrary.

comment:7 by Stan, 10 years ago

Well them tell them to use the discrete :)

comment:8 by Niek, 10 years ago

What if people don't have a dedicated GPU?

comment:9 by Stan, 10 years ago

I believe that's more easy to detect :)

comment:10 by scythetwirler, 10 years ago

I don't seem to be able to reproduce it on my Intel Integrated HD 2500.

comment:11 by Itms, 10 years ago

Milestone: Alpha 17Alpha 18

Workarounds exist and this is too complex to fix now, so pushing this back to A18.

comment:12 by Itms, 10 years ago

Description: modified (diff)
Owner: Itms removed

comment:13 by kanetaka, 10 years ago

I think tool tip text for prefer GLSL should recommend integrated graphics users to enable it.

comment:14 by wraitii, 9 years ago

Itms: I don't seem to be able to reproduce this. Can you give some more precisions, like what water settings does it happen with?

Also where is the "offending code" you referred to above?

comment:15 by scythetwirler, 9 years ago

Priority: Release BlockerMust Have

comment:17 by philip, 9 years ago

Owner: set to philip
Resolution: fixed
Status: newclosed

In 16372:

Always select a texture unit before calling glEnable(GL_TEXTURE_2D).

Without this, some code will enable (and set other parameters for) whatever random texture unit the previous stage had selected. This can break any fixed-function rendering, since either it will not have enabled the correct texture unit, or its correct setup will be interfered with by another texture unit that shouldn't be enabled. (This doesn't affect ARB/GLSL shader rendering, since they don't care about the enabled state, but the GUI (and some debug things) are still FFP in the default ARB mode.)

Fixes #2833 (in which the fancy water shader selected texture units 5/6, which then got enabled, and remained enabled forever).

Note: See TracTickets for help on using tickets.