FWGS / xash3d

DEPRECATED in favor of https://github.com/FWGS/xash3d-fwgs. Only bugfixes are accepted.
https://xash.su
GNU General Public License v3.0
549 stars 107 forks source link

Graphic errors with NANOGL and SDL2 (GLES) #444

Open vanfanel opened 5 years ago

vanfanel commented 5 years ago

Hi there!

I got Xash3D to build fine on GNU/Linux without an X server, using SDL2 in KMSDRM mode. SDL2 of course is built with GLES support and without OpenGL support. So I built Xash3D with NANOGL. So I built Xash3D, game library, etc... and it works "fine". Smooth framerate, good playability, all in all very good to see it running like this without an X server in the middle! :)

However, in Half-Life, just after the incident with the ray at the beggining of the game, there are errors: clipping problems, rooms and characters visible through the walls, etc. Is that known/expected with NANOGL on GLES?

Using the latest git sources here, and VC4 MESA GLES implementation, on an aarch64 system (I built 64bit versions of the game libs too, of course).

mittorn commented 5 years ago

run with -dev 5 and show r_info It seems that something wrong with depth buffer or with glDepthRange check depth bits value

mittorn commented 5 years ago

Can you upload screenshots of graphical issues? (fbgrab for example)

mittorn commented 5 years ago

And it should be possible to use full opengl with EGL. vc4 driver supports it and nanogl does not improve performance on mesa drivers (in comparsion with some proprietary implementations that work very slow with glbegin/glend) Also, try toggle r_vbo. It does not seems to work good on vc4.

vanfanel commented 5 years ago

@mittorn Sorry for the delay! fbgrab does not work with KMSDRM/VC4, and the broadcom VC tools to capture framebuffer does not work either in KMSDRM/VC4 mode, so I had to resort to take pictures with my cellphone. Sorry about the abysmal quality:

https://www.dropbox.com/s/t0p1j0b389mqht4/20190323_205037.jpg?dl=0 https://www.dropbox.com/s/qx29svihbi6f6u1/20190323_205113.jpg?dl=0

I have tried setting r_vbo to 0 in valve/config.cfg, and in fact these problem dissapear: all walls seem to be solid now! (So it seems it's r_vbo not working right with VC4 as you said). There's still this small defect on the wall texure behind the retina scanning machine: https://www.dropbox.com/s/fvn5qv77iuwcdkb/20190323_210759.jpg?dl=0

About using the full DesktopGL on EGL instead on GLES+NANOGL: doesn't full DesktopGL on EGL need an Xorg server running?

mittorn commented 5 years ago

No, it should work in kms too. Maybe you need to rebuild SDL2 with opengl support

vanfanel commented 5 years ago

@mittorn : But SDL2 does not build/work with Full OpenGL without an Xorg server, does it?

a1batross commented 5 years ago

SDL2 doesn't have strict dependency on X11. You can completely remove it on configuration stage.

a1batross commented 5 years ago

SDL2 doesn't have strict dependency on X11. You can completely remove it on configuration stage.

mittorn commented 5 years ago

Full opengl does not have any difference with opengl es in context creation. It is only other context bit in EGL when using EGL.