xash3d icon indicating copy to clipboard operation
xash3d copied to clipboard

Graphic errors with NANOGL and SDL2 (GLES)

Open vanfanel opened this issue 5 years ago • 9 comments

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).

vanfanel avatar Mar 13 '19 13:03 vanfanel

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

mittorn avatar Mar 13 '19 15:03 mittorn

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

mittorn avatar Mar 13 '19 15:03 mittorn

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.

mittorn avatar Mar 13 '19 15:03 mittorn

@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?

vanfanel avatar Mar 23 '19 20:03 vanfanel

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

mittorn avatar Mar 23 '19 21:03 mittorn

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

vanfanel avatar Mar 23 '19 21:03 vanfanel

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

a1batross avatar Mar 23 '19 22:03 a1batross

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

a1batross avatar Mar 23 '19 22:03 a1batross

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

mittorn avatar Mar 24 '19 09:03 mittorn