Skip to content

Graphic errors with NANOGL and SDL2 (GLES) #444

Open
vanfanel opened this issue Mar 13, 2019 · 9 comments
Open

Graphic errors with NANOGL and SDL2 (GLES) #444

vanfanel opened this issue Mar 13, 2019 · 9 comments

Comments

@vanfanel
Copy link

vanfanel commented Mar 13, 2019

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
Copy link
Member

mittorn commented Mar 13, 2019

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

@mittorn
Copy link
Member

mittorn commented Mar 13, 2019

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

@mittorn
Copy link
Member

mittorn commented Mar 13, 2019

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
Copy link
Author

@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
Copy link
Member

mittorn commented Mar 23, 2019

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

@vanfanel
Copy link
Author

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

@a1batross
Copy link
Member

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

1 similar comment
@a1batross
Copy link
Member

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

@mittorn
Copy link
Member

mittorn commented Mar 24, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants