Author Topic: [FIXED] A problem with switching to OpenGL? [OXC]  (Read 5263 times)

Offline N7Kopper

  • Captain
  • ***
  • Posts: 61
    • View Profile
[FIXED] A problem with switching to OpenGL? [OXC]
« on: October 22, 2017, 06:55:46 pm »
So, after a while of playing this beautiful little program (yes, I am using the v2017-10-10 Windows version of OpenXcomExtended+ v3.9c on Windows 7 Ultimate, aka the latest one unless the stickied OP is lying - so this should be the right topic, as this may not apply to the vanilla OpenXcom - which I have no interest in because this one's better :P) on my absolute junker of a laptop with an embedded GPU which can't handle OpenGL well at all, I decided to switch to my desktop computer, which - while old - is quite capable for it's time. (some of the filters in this game make it puke, but most still clock a smooth 60fps)

But therein lies my problem. I wanted to up the resolution to the maximum my monitor can handle (1280 x 1024) and use hardware rendering (just the Raw filter, otherwise known as no filter) but while it works just fine (at least with the original Geoscape and Battlescape scaling, it runs at ~90% GPU at 60 FPS) the game keeps trying to boot me to the horrible xBRZ software renderer. In fact, once I switch to Raw and go back to the Options menu, the game is thumbing its nose at me by showing xBRZ as the renderer. This is despite the fact that OpenGL rendering is enabled in the raw YAML settings file and xBRZ is disabled. In fact, the string in the settings for the currently used shader is being deleted automatically by the game, and this is being interpreted as xBRZ mode. To clarify, my game and settings are all on the desktop in a self-contained folder for portability, and nothing is read-only. (My first boot was via cmd to make sure of this)

This snippet from the verbose log stuck out to me.
Code: [Select]
22-10-2017_16-25-04] [INFO] requested file not found:
[22-10-2017_16-25-06] [ERROR] OpenGL shader link failed "Link called without any attached shader objects."

[22-10-2017_16-25-06] [INFO] requested file not found:
[22-10-2017_16-25-06] [ERROR] OpenGL shader link failed "Link called without any attached shader objects."
I know the filters are there, and I know that they work. I didn't change the shader folder at all, and when I turn it on (Raw), the GPU usage spikes (to ~90% as previously stated) whereas the software renderer (Disabled) provides the expected result of running entirely via the CPU.  This is annoying, because while the software renderer lets me play the game, doing any screen capturing stuff is out of the question. (even if I would potentially have to lower my resolution/FPS for OBS to work decently)

I was hoping for my first post to be a little different, a warm greeting after my first modern playthrough where I (hopefully) kick some grey backside, but alas, technical support called first. Hopefully it's not something stupid like "oh hey you made FLAC versions of those WAV files in the PS1 SFX pack so you can see if FLAC is properly implemented and you can save a little space but you didn't get around to actually making a new mod yet so imma mess up your OpenGL kthxbaiiii!"
« Last Edit: February 02, 2023, 03:07:52 pm by Meridian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9078
    • View Profile
Re: A problem with switching to OpenGL?
« Reply #1 on: October 22, 2017, 07:19:48 pm »
It's a bug in vanilla... which was fixed a few days ago... I'll try to cherry-pick the fix into OXCE+ too and provide a new version within few days.

Btw. welcome to the forums :)
You got yourself one insignificant welcome bonus point for saying OXCE+ is better :P

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9078
    • View Profile
Re: A problem with switching to OpenGL?
« Reply #2 on: October 23, 2017, 08:35:13 am »

Offline Ves

  • Sergeant
  • **
  • Posts: 35
    • View Profile
Re: A problem with switching to OpenGL?
« Reply #3 on: February 24, 2018, 04:43:38 pm »
Hello, i'm sorry for upping this older thread, but it sounds quite similar to the problem i'm having. I'm now playing Piratez which uses 3.9c (10.10.2017) and  for me the raw filter speeds up the animation speed significantly so its kind of a problem that this filter doesn't "stick". My OS is Manjaro, a Arch linux derivative, so i can't use the uploaded version or the precompiled versions for debian and  it would really help if someone could point me to the sourcecode for this version (or any version that solves this bug and works with Piratez), so i can compile it.   

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9078
    • View Profile
Re: A problem with switching to OpenGL?
« Reply #4 on: February 24, 2018, 04:58:32 pm »
Option 1:

https://github.com/MeridianOXC/OpenXcom/commits/oxce3.5-plus-proto

Note: Piratez will crash with this version, but it can be easily fixed by just adding one simple line to the ruleset (clipSize: -1) for one weapon (I don't remember the name, but you will see it in the log file).

Option 2:

Use any version you have available and cherry-pick the attached commits from OpenXcom repo (https://github.com/SupSuper/OpenXcom).
« Last Edit: February 24, 2018, 05:01:59 pm by Meridian »

Offline Ves

  • Sergeant
  • **
  • Posts: 35
    • View Profile
Re: A problem with switching to OpenGL?
« Reply #5 on: February 24, 2018, 06:28:12 pm »
That was fast   :o

Option 1 worked for me, with terminal output pointing to STR_RANGEFINDER. Filter sticks after a restart, so i think i have everything sorted now.

Thanks a lot Meridian  :)