gl4es icon indicating copy to clipboard operation
gl4es copied to clipboard

//TODO: Add GL_COPY_READ_BUFFER and GL_COPY_WRITE_BUFFER

Open Mathias-Boulay opened this issue 2 years ago • 3 comments

Hello again ! For quite a while @PojavLauncherTeam has been stuck trying to implement this //TODO that we found inside the function gl4es_glCopyBufferSubData.

Popular minecraft mods nowadays are using those two buffers, an example being Optifine 1.17+ Render Regions implementation

As far as I am aware, both GL_COPY_READ_BUFFER and GL_COPY_WRITE_BUFFER have used to bind on existing buffers to do a raw copy.

So in theory, when those buffers types are detected on gl4es_glBindBuffer, we should point towards the same buffers as the ones Gl4es handles, then give them back with getbuffer_buffer

But I kinda failed to do that it seems, and I feel like you know what should really be done ?

Mathias-Boulay avatar Apr 27 '23 13:04 Mathias-Boulay

Mmm, I'll have a look, see if I can do some implementation of that. You know only of Optifine that use it?

ptitSeb avatar Apr 28 '23 13:04 ptitSeb

No, sodium uses it as well ! I'll try to get the code section in question

Mathias-Boulay avatar Apr 28 '23 14:04 Mathias-Boulay

You can find it here: https://github1s.com/CaffeineMC/sodium-fabric/blob/HEAD/src/main/java/me/jellysquid/mods/sodium/client/gl/device/GLRenderDevice.java

Mathias-Boulay avatar Apr 28 '23 14:04 Mathias-Boulay