Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JustMeDaFaq opened this issue Mar 28, 2021 · 3 comments
Open
Labels
bug Something isn't working

Comments

@JustMeDaFaq
Copy link

JustMeDaFaq commented Mar 28, 2021

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

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:

glDisable(GL_DEPTH_TEST);

@Swordfish90 Swordfish90 added the bug Something isn't working label Mar 29, 2021
@JustMeDaFaq
Copy link
Author

JustMeDaFaq commented Mar 30, 2021

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:

glDisable(GL_DEPTH_TEST);

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

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants