-
Notifications
You must be signed in to change notification settings - Fork 5
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
[OpenGL ES] NV_pixel_buffer_object doesn't define GL_STREAM_READ #66
Comments
@mheyer32 is the contact on this spec now. These were pretty heavily "inspired" by the desktop specs. It's entirely possible that the enum was inadvertently copied from there. |
@nvmheyer would be me with NVIDIA hat on :-) This is certainly a mistake in the NV_pbo extension specs (which are in fact based off the desktop extension spec language) to use GL_STREAM_READ. The other example uses GL_STREAM_DRAW. One could argue that the EXT_map_buffer_range extension should have introduced new usage hints as it allows reading back from buffers for the first time in GLES. This should not be a huge problem, though. The buffer usage hints are not a good indicator of how a buffer is going to be used. The NVIDIA driver, for instance, will mostly ignore the hints and instead infer the optimal buffer storage from the actual usage. |
Ah, indeed, it seems like this is just a hint and that it doesn't constrain the actual usage. It's unfortunate that there's no "no hint" enum value. Mesa also ignores the hint in this situation: https://gitlab.freedesktop.org/mesa/mesa/-/blob/e5339fe4a47c242693962c9f90bbab8b74935cba/src/mesa/state_tracker/st_cb_bufferobjects.c#L248
Should we somehow fix the examples?
Indeed. I'm not sure if/how we can fix that. |
@nvmheyer Would you mind creating a PR to fix this minor issue? Thanks. |
GL_STREAM_READ is not available in ES2.0. In fact, EXT_map_buffer_range was the first time a mapped buffer could be read from legally. Just use GL_STREAM_DRAW instead. This is not a major problem, though, as the usage hints do not affect the legal usage of a buffer and are taken by the drivers merely as hints, sometimes even being ignored. KhronosGroup/OpenGL-API#66
OpenGL ES 2.0 core only defines
GL_STREAM_WRITE
.NV_pixel_buffer_object
advertises that it allows "Asynchronous glReadPixels". The code examples useGL_STREAM_READ
. However including both<GLES2/gl2.h>
and<GLES2/gl2ext.h>
isn't enough to get access to this symbol necessary for creating a PBO that can be read from. No other GLES2 extension seems to define it.Is this an oversight?
cc @pow2clk
The text was updated successfully, but these errors were encountered: