Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading times much longer with OpenGL than SDL on Linux #58

Open
akien-mga opened this issue Jan 9, 2016 · 2 comments
Open

Loading times much longer with OpenGL than SDL on Linux #58

akien-mga opened this issue Jan 9, 2016 · 2 comments

Comments

@akien-mga
Copy link
Contributor

It's something that we add discussed privately already some time ago, but I just checked and can still reproduce the issue, so I guess it's worth a bug report (if only so that other Linux users can confirm it or not).

When using the OpenGL renderer (default option), the loading times for maps (e.g. a custom game with default settings) can be quite long, maybe 20-30s or so. After switching to the SDL renderer, loading times are much shorter, a custom game will typically load in a matter of seconds.

That brings two questions:

  • why are the loading times so long with OpenGL (and apparently only on Linux)?
  • is there a loss of functionality to defaulting to SDL for Linux users as a workaround, or is it more or less the same?
@Andrettin
Copy link
Owner

Other users have reported this issue as well. I'm not sure why it happens though, and it does seem to be Linux-specific. Maybe the graphics are being improperly freed after a scenario on Linux, causing them to need to be reloaded every time?

Regarding loss of functionality, the Steam overlay works only if OpenGL is active, but not with SDL. Using OpenGL also improves the game's performance significantly.

@Andrettin
Copy link
Owner

I've checked the instances where the graphics are freed, but the only one that had Linux-specific graphic freeing (InitVideoSDL()) is only called once, when the game starts.

I then looked at the unit type's CGraphic loading, but, well, if the graphic has a Surface, the CGraphic::Load function returns right at the beginning. Same thing for OpenGL texture creation, it returns if a texture is already present for that CGraphic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants