Bug #137

r_depthbits 32 -> render @ 0-1fps

Added by boutetnico over 7 years ago. Updated about 4 years ago.

Status:Feedback% Done:


Target version:2.78
OS:Windows Arch:


Setting r_depthbits "32" on my Windows 7 x64 fresh ET:Legacy install makes the game rendering @ 0-1fps

It happens both on fs_game "legacy" and in ETrun mod.

r_depthbits "32" works well on my main ET install.

Can anyone confirm the bug?

2012-11-29-020756-goldrush-ga.jpg (38 KB) RaFaL, 29.11.2012 02:22


Related issues

Duplicated by ET: Legacy Development - Bug #769: r_depthbits higher than 24 causes lag Invalid 11.01.2015

Associated revisions

Revision 646b9273
Added by IR4T4 almost 7 years ago

renderer: fix for r_depthbits 32 refs #137


#1 Updated by Mateos over 7 years ago

Tested on Oasis with the RC1, 90 FPS on 24 bits, same on 32 bits, and even did a vid_restart to check.

Only thing I had, but since default settings: entities have a kind of shadow in the mid-air above them on Oasis for me... Have to check if already reported.

#2 Updated by RaFaL over 7 years ago

Hmm I tested it and it look like there must be smth with 32 value I connected to etlegacy server and screen was all red
I builded ET Legacy from last git commit

PS: ETL RC1 same result

#3 Updated by IR4T4 over 7 years ago

Looks like we have to add some code to sdl_glimp.c (line 330++). There is no case for r_depthbits "32" and we have to subtsract r_depthbits.

1. Windows GPL code differs from ours
2. r_depthbits 32 isn’t supported by all video cards (info from the internet)

#4 Updated by IR4T4 over 7 years ago

  • Target version changed from 2.71rc1 to 2.71rc2

#5 Updated by IR4T4 almost 7 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 50

I’m getting a display which wasn’t the case on linux before this commit: http://www.etlegacy.com/projects/etlegacy/repository/revisions/646b92733c1c2acfa8097d6be340981d61bf5133/diff/src/sdl/sdl_glimp.c

Can someone test r_depthbits 32 on Windows?

#6 Updated by IR4T4 almost 7 years ago

  • Assignee set to boutetnico

#7 Updated by boutetnico almost 7 years ago

Tested on Windows 7 x64 with a compiled version from git repository, the issue is still the same, 0 to 1fps when r_depthbits is 32.

#8 Updated by IR4T4 over 6 years ago

  • Target version changed from 2.71rc2 to 2.78

#9 Updated by Saukko over 6 years ago

I tried this out with Windows 8.1 64-bit, without any luck.
In vanilla ET it works without any problems.
Though r_depthbits "32" can’t even be chosen through the options menu. Maybe that possible could be added when the problem will be solved?


#10 Updated by Radegast over 6 years ago

  • OS set to Windows

#11 Updated by Spyhawk about 5 years ago

  • Duplicated by Bug #769: r_depthbits higher than 24 causes lag added

#12 Updated by boutetnico about 5 years ago

  • Assignee deleted (boutetnico)

#13 Updated by yfcz about 4 years ago

Currently there is implemented test which determines if SDL_GL_CreateContext gets some OGL context. It doesn’t care if it is HW accelerated or not.

There is GDI Generic renderer shipped with Windows which provides OpenGL 1.1 context without hardware acceleration. And it supports 32-bit depth buffer.

So if you try to use 32-bit depth buffer and drivers of your video card doesn’t support it, it will use GDI OGL context — which has terrible performance since it has no HW acceleration.

The solution might be to distinguish accelerated and non-accelerated OGL contexts and use these accelerated only.
I’ve already implemented this, see my latest commit(s) at this branch: https://github.com/yfcz/etlegacy/commits/issue137
What do you think about this solution?

(If you’re going to compile here are updated libs: https://github.com/yfcz/etlegacy-libs/commit/2d8c44cbafdbc39987096d5c562ec30302bbe653 )

#14 Updated by IR4T4 about 4 years ago

The solution is fine but also a big blowing up of the source code for one value of a cvar which is marked as unsafe.

Also available in: Atom PDF