OpenGL ES Fix#270
Open
Waterdish wants to merge 1 commit into
Open
Conversation
…that broke the opengl es renderer on mobile devices
snesrev
reviewed
Aug 22, 2023
| glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, g_draw_width, g_draw_height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, g_screen_buffer); | ||
| else | ||
| glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, g_draw_width, g_draw_height, 0, GL_BGRA, GL_UNSIGNED_BYTE, g_screen_buffer); | ||
| glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA, g_draw_width, g_draw_height, 0, GL_BGRA, GL_UNSIGNED_BYTE, g_screen_buffer); |
Owner
There was a problem hiding this comment.
GL_BGRA doesn't appear to be a valid value for this parameter?
Author
There was a problem hiding this comment.
I was getting a GL_INVALID_VALUE (0x501) error until I changed the internal format to match the format. Having them both as GL_RGBA also worked, but I got a black screen with GL_RGBA as the internal format and GL_BGRA as the format. I found the solution on this page: https://stackoverflow.com/questions/50717395/how-to-load-a-bgra-image-texture-in-gles2
It may be an issue specific to android, but it fixed the errors on both an x86-64 android emulator and physical android device with an Adreno 630 GPU.
danielsoares02
added a commit
to danielsoares02/zelda3
that referenced
this pull request
Jan 5, 2025
Correção no src/main.cs, pullrequest snesrev#247 Correção no src/opengl.cs, pullrequest snesrev#270 Correção no src/platform/switch/Makefile, pullrequest snesrev#273 Correção no MakeFile, pullrequest snesrev#276 Correção no src/select_file.c, pullrequest snesrev#292
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This centers the viewport and fixes opengl es not rendering anything on mobile devices.