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

feat: Mipmapping wherever available, rcfile option #4240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Cgettys
Copy link
Contributor

@Cgettys Cgettys commented Jan 15, 2025

  • Make MipmapOptions an enum class
  • Add a struct to encapsulate a bunch of options that always go together
  • Use MipmapOptions instead of an opaque bool
  • Add rcfile option to opt/in out of trying to mipmap, to override a weird heuristic we have for some images.
  • Support mipmapping if GL_ARB_framebuffer_object extension is available too (basically all HW)
  • Support mipmapping on OpenGL ES 2+ as well.
  • Simplify the LoadTexture code (even covering subtexture + offset case we don't exercise today)
  • Also avoid some pointless reallocations
  • Optimize a loop that could have been a memset
    The comment said it was making a full white glyph - it wasn't doing what it intended, and was doing so inefficiently. Now it is.
  • Also optimize the loop ordering in one of the font rendering functions to have better memory locality instead of skipping around.

@Cgettys
Copy link
Contributor Author

Cgettys commented Jan 15, 2025

I'd like to see folks test this on:

  • Android
  • Pre-OpenGL 3 but GL_ARB_framebuffer_object supporting HW
  • Modern HW

Before merge.
I've tried to emulate the second and 3rd, and tested the ES string parsing logic. But would find it helpful to have others confirm.

@Cgettys Cgettys force-pushed the opengl-modernization-04 branch 3 times, most recently from d918532 to f7a021f Compare January 15, 2025 04:29
* Make MipmapOptions an enum class
* Add a struct to encapsulate a bunch of options that always go together
* Use MipmapOptions instead of an opaque bool
* Add rcfile option to opt/in out of trying to mipmap, to override a weird heuristic we have for some images.
* Support mipmapping if GL_ARB_framebuffer_object extension is available too (basically all HW)
* Support mipmapping on OpenGL ES 2+ as well.
* Simplify the LoadTexture code (even covering subtexture + offset case we don't exercise today)
* Also avoid some pointless reallocations
* Optimize a loop that could have been a memset
The comment said it was making a full white glyph - it wasn't doing what it intended, and was doing so inefficiently. Now it is.
* Also optimize the loop ordering in one of the font rendering functions to have better memory locality instead of skipping around.
@Cgettys Cgettys force-pushed the opengl-modernization-04 branch from f7a021f to 0754e4c Compare January 15, 2025 07:33
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

Successfully merging this pull request may close these issues.

1 participant