cbhacks / CrashEdit

Unofficial Crash Bandicoot 1/2/3 Level Editor
https://www.cbhacks.com/tools/crashedit/
Other
135 stars 27 forks source link

Incompatibility issue #84

Closed ManDude closed 4 years ago

ManDude commented 8 years ago

Line 249 in ThreeDimensionalViewer.cs: GL.ClearDepth doesn't work with some OpenGL versions (including mine). What is it supposed to do? I just comment it and the program still behaves fine.

ughman commented 8 years ago

Yeah apparently I didn't realize the value passed there needs to be in the range 0 to 1, and the default is already the max value anyway. Strange that it would crash though, the GL documentation says the values get clamped. Could be a bug in the older intel drivers I guess.

Should be fixed in the 3D rewrite I'd really like to get through today.

ManDude commented 8 years ago

Setting it as anything from 0 to 1 doesn't work either. The mouse-over dialog for GL.ClearDepth is this: "[requires: v4.1 or ARB_ES2_compatibility|VERSION_4_1]"

I'm pretty sure short.MaxValue means 32767 btw.

ughman commented 8 years ago

I blame OpenTK. Apparently GL.ClearDepth(float) is an override which calls some GL 4.0 garbage. The actual function I wanted is GL.ClearDepth(double). Either way the call is pointless, definitely going to get rid of it.

http://www.opentk.com/node/2514