Swordfish90 / LibretroDroid

GNU General Public License v3.0
68 stars 16 forks source link

GL Cores that not using "depth" are resulting in an black texture #64

Open JustMeDaFaq opened 3 years ago

JustMeDaFaq commented 3 years ago

Hi, any cores (currently developing my own) where hw_render_callback->depth is false, the resulting texture done by framebufferrenderer.cpp is just black, game works tho sound is working etc. The framebuffer is valid and blitting it to the mainbuffer shows its correcty, so its probably related to the depth value. (Same also happens to the Duckstation core, that one also needs retro_hw_context_type::RETRO_HW_CONTEXT_OPENGLES_VERSION tho)

Swordfish90 commented 3 years ago

Hi @JustMeDaFaq . I've been able to reproduce a similar issue with flycast (which actually uses the depth buffer). Does removing this line fix the issue:

https://github.com/Swordfish90/LibretroDroid/blob/c56ded975db1c5ace00e13027f520b198bde225d/libretrodroid/src/main/cpp/video.cpp#L182

JustMeDaFaq commented 3 years ago

Hi @JustMeDaFaq . I've been able to reproduce a similar issue with flycast (which actually uses the depth buffer). Does removing this line fix the issue:

https://github.com/Swordfish90/LibretroDroid/blob/c56ded975db1c5ace00e13027f520b198bde225d/libretrodroid/src/main/cpp/video.cpp#L182

@Swordfish90 Deleting that line didnt worked. For flycast (as also for PPSSPP) doing: case RETRO_ENVIRONMENT_GET_PREFERRED_HW_RENDER: { LOGD("Called RETRO_ENVIRONMENT_GET_PREFERRED_HW_RENDER"); *((unsigned*) data) = retro_hw_context_type::RETRO_HW_CONTEXT_OPENGLES3 | retro_hw_context_type::RETRO_HW_CONTEXT_OPENGL; return true;

Should show the video (it expects the OPENGL one)

Swordfish90 commented 2 years ago

Hi @JustMeDaFaq. I've recently refactored the code and I found an issue with how the depth buffer was passed to cores. Is this issue still reproducible on the latest master?