static inline struct gl_buffer_object **
get_buffer_target(struct gl_context *ctx, GLenum target)
{
- /* Other targets are only supported in desktop OpenGL and OpenGL ES 3.0.
- */
- if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)
- && target != GL_ARRAY_BUFFER && target != GL_ELEMENT_ARRAY_BUFFER)
- return NULL;
+ /* Other targets are only supported in desktop OpenGL and OpenGL ES 3.0. */
+ if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx)) {
+ switch (target) {
+ case GL_ARRAY_BUFFER:
+ case GL_ELEMENT_ARRAY_BUFFER:
+ break;
+ case GL_PIXEL_PACK_BUFFER:
+ case GL_PIXEL_UNPACK_BUFFER:
+ if (!ctx->Extensions.EXT_pixel_buffer_object)
+ return NULL;
+ break;
+ default:
+ return NULL;
+ }
+ }
switch (target) {
case GL_ARRAY_BUFFER_ARB:
EXT(NV_image_formats , ARB_shader_image_load_store , x , x , x , 31, 2014)
EXT(NV_light_max_exponent , dummy_true , GLL, x , x , x , 1999)
EXT(NV_packed_depth_stencil , dummy_true , GLL, GLC, x , x , 2000)
+EXT(NV_pixel_buffer_object , EXT_pixel_buffer_object , x , x , x , ES2, 2012)
EXT(NV_point_sprite , NV_point_sprite , GLL, GLC, x , x , 2001)
EXT(NV_primitive_restart , NV_primitive_restart , GLL, x , x , x , 2002)
EXT(NV_read_buffer , dummy_true , x , x , x , ES2, 2011)