Welcome, Guest.
Username: Password: Remember me

TOPIC: [SOLVED] IL2 1946 SetPixelFormat issue.

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 9 months ago #1

Hi Crosire,

Really old OpenGL engined flight simulator is failing to start with ReShade. Log indicates invalid pixel format when createcontext is called.

Game uses 32 colour bits, 24 depth bits and 8 stencil bits.

I know it's a case of diminishing returns to keep catching and creating workarounds for ancient game engines especially when it seems that ReShades goal is to be a generic framework, but this was the game I tested reshade on so here's the bug report.

Warning: Spoiler! [ Click to expand ]
The administrator has disabled public write access.

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 9 months ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2438
  • Thank you received: 1387
Mind also posting the tracelog (or its part around "SetPixelFormat", which prints out some more info about the problematic format)? =)
Cheers, crosire =)
The administrator has disabled public write access.

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 9 months ago #3

tracelog portion...

Warning: Spoiler! [ Click to expand ]
Last Edit: 1 year 9 months ago by crosire. Reason: Added code tags
The administrator has disabled public write access.

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 9 months ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2438
  • Thank you received: 1387
Any missing driver updates?
Cheers, crosire =)
Last Edit: 1 year 8 months ago by crosire.
The administrator has disabled public write access.

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 9 months ago #5

Using an nvidia card which supports OpenGL 4.3 and drivers support 4.5.
The administrator has disabled public write access.

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 9 months ago #6

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2438
  • Thank you received: 1387
Would be interesting to see if it's that particular pixel format (though I'd be surprised, the properties with which it was requested are quite standard), which is the problem or something else. Mind getting on Steam? I'd send you a build which forces a different pixel format for testing and some other small tweaks ... =)
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: BrokenGL

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 9 months ago #7

Added you on Steam, my name on there is Moezilla.
The administrator has disabled public write access.

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 8 months ago #8

Has there been any further development of this issue? I am encountering the same issue when trying to utilize ReShade for this title.
The administrator has disabled public write access.

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 8 months ago #9

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2438
  • Thank you received: 1387
Yes, I have a fix for it, but I'm not really happy with it yet, which is why it didn't make it into 0.15.0.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: Jake53

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 8 months ago #10

Alright cool, what should I look for in future change logs that will indicate the solution is included? Thanks for your efforts, and good luck with future developments. Looking forward to using ReShade in this game!
The administrator has disabled public write access.

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 8 months ago #11

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2438
  • Thank you received: 1387
Jake53 wrote:
Alright cool, what should I look for in future change logs that will indicate the solution is included?
I plan to have it fixed with 0.16.0. =)
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: Jake53

IL2 1946 [OpenGL] SetPixelFormat issue. 1 year 8 months ago #12

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2438
  • Thank you received: 1387
Update on this: Finally fully figured out the "why". For anybody interested: the game calls the undocumented "wglSetPixelFormat" directly, where it actually is supposed to call GDI "SetPixelFormat". This caused the context creation to fail. ReShade 0.16.0 now reroutes these illegal calls back to "SetPixelFormat" and by that fixes the issue.
Cheers, crosire =)
Last Edit: 1 year 8 months ago by crosire.
The administrator has disabled public write access.