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

Merge OpenGL renderers... #12087

Open
icculus opened this issue Jan 25, 2025 · 2 comments
Open

Merge OpenGL renderers... #12087

icculus opened this issue Jan 25, 2025 · 2 comments
Milestone

Comments

@icculus
Copy link
Collaborator

icculus commented Jan 25, 2025

Possibly dumb thought that came to mind:

  • We have OpenGL and GLES2 code.
  • We used to have GLES1 code.
  • Most of this stuff is similar.
  • Fixes land in one that don't necessarily make it to the other.

It might be nice if we try to merge this into one codebase that just treats OpenGL and GLES as some sort of GL that has different sets of extensions.

A side benefit of this would be restoring GLES1 support; we couldn't do this before because logical presentation required a render target, but that requirement is gone now. It would just be a sort of GL that doesn't have many extensions at all.

The renderer would listen for "opengl" "opengles2" and "opengles1" as renderer names, and use that name to decide how to set up the GL context.

In practice, this might be a terrible idea, but it could be worth exploring.

@slouken
Copy link
Collaborator

slouken commented Jan 25, 2025

It seems worth exploring. You might have functions that are heavily bifurcated by available extensions and symbols, but still might be cleaner than the current setup.

@slouken slouken added this to the 3.x milestone Jan 25, 2025
@ccawley2011
Copy link
Contributor

A possible approach would be to have two renderers, one for newer OpenGL with shaders (including GLES2), and one for older OpenGL with fixed function APIs (including GLES1). It may also be relatively easy to share code between the two, such as for creating and uploading for textures.

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

No branches or pull requests

3 participants