edo9300 / edopro

A script engine for "yu-gi-oh!" and sample gui (former "ygopro")
Other
286 stars 76 forks source link

Textures not rendered #151

Closed efrizoid closed 4 years ago

efrizoid commented 4 years ago

On some of my linux machines for some reason textures are not rendered (see picture). It seems that it is related to opengl version. I tested this program on 4 different machines (3 manjaro, 1 arch) and this problem occurs on 2 of them, where the program prints "Using renderer: OpenGL 4.6" at the startup. On machines where it prints "Using renderer: OpenGL 3.0" everything works fine... Any ideas what could be the cause?

Screenshot_2020-04-13_13-07-31

edo9300 commented 4 years ago

This issue with the driver is pretty troublesome, expecially because we can run the client fine on manjaro + opengl 4.6, so it might be a driver issue for that specific graphics card, a thing you could try, is forcing a forced gl version to be used with the program MESA_GL_VERSION_OVERRIDE=3.0 ./EDOPro and see if it works

efrizoid commented 4 years ago

Tried MESA_GL_VERSION_OVERRIDE=3.0 ./EDOPro, but still the problem persists. Also tried adding MESA_GLSL_VERSION_OVERRIDE=330 (because the program was printing that it still uses GLSL 4.6), but no luck either. Is it possible to turn on some kind of logging which could help in this situation?

edo9300 commented 4 years ago

Hmm, so even force setting it to 3.0 didn't work either. What graphic drivers and gpus are being used in those computers?

edo9300 commented 4 years ago

After further investigation, i think that issue is caused by the driver not workign properly with the flag GL_TEXTURE_COORD_ARRAY (maybe it's not correctly set?), in fact, if this statement is removed https://github.com/edo9300/irrlicht1-8-4/blob/master/source/Irrlicht/COpenGLDriver.cpp#L1464 , that issue is replicated 100% of the time on other devices as well image

efrizoid commented 4 years ago

Here is some info about one of the GPUs (I can't access the other machine for now):

Vendor: Intel (0x8086) Device: Mesa Intel(R) HD Graphics 5500 (BDW GT2) (0x1616) Version: 20.0.4 Accelerated: yes Video memory: 3072MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) HD Graphics 5500 (BDW GT2) OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.4 OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.0.4 OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.0.4 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

GreatNovaDragon commented 4 years ago

Can replicate on Arch based distros.

I tried to replicate on OpenSUSE and several Debian/Ubuntu distros, but it doesnt happen there.

kevinlul commented 4 years ago

Confirmed cases:

result

kevinlul commented 4 years ago

From Hope#7910: mesa 20.0.4 -> 20.0.5 introduces the regression, using OpenGL 4.5

HopeBaron commented 4 years ago

From Hope#7910: mesa 20.0.4 -> 20.0.5 introduces the regression, using OpenGL 4.5

Right, downgrading fixed my issue. As for the original issue, it seems OpenGL 4.6 is the package causing the issue downgrading it will do. Not sure, but maybe the 20.0.5 works with that version of OpenGL

RillingDev commented 4 years ago

I can reproduce this issue on archlinux with mesa 20.0.5-1, opengl 4.6, xorg-server 1.20.8-1. downgrading to mesa 20.0.4-2 fixes the issue.

RillingDev commented 4 years ago

Updating to mesa-20.0.6-1 fixed the issue as well.

edo9300 commented 4 years ago

Updating to mesa-20.0.6-1 fixed the issue as well.

So maybe this regression got fixed in the new version. @EimantasLedinauskas, @feuerpanda , @HopeBaron could you check if this issue is fixed on your end as well with the driver update?

efrizoid commented 4 years ago

Updating to mesa-20.0.6-1 fixed the issue as well.

So maybe this regression got fixed in the new version. @EimantasLedinauskas, @feuerpanda , @HopeBaron could you check if this issue is fixed on your end as well with the driver update?

Yes, the issue disappeared with the new mesa version for me too.

deus369 commented 2 years ago

i have this issue with basic opengl texturing :O this post made me realize it might be the drivers. It works on my Pinephone Pro and not my pc with nvidia.