gl: Limit glGetTexLevelParameteriv use to supported platforms
This commit is contained in:
		 Michał Potomski
					Michał Potomski
				
			
				
					committed by
					
						 Matthias Clasen
						Matthias Clasen
					
				
			
			
				
	
			
			
			 Matthias Clasen
						Matthias Clasen
					
				
			
						parent
						
							ad3972e6b1
						
					
				
				
					commit
					673bd65090
				
			| @ -107,6 +107,7 @@ typedef struct { | ||||
|   guint debug_enabled : 1; | ||||
|   guint forward_compatible : 1; | ||||
|   guint is_legacy : 1; | ||||
|   guint has_tex_param : 1; | ||||
|  | ||||
|   int use_es; | ||||
|  | ||||
| @ -435,6 +436,14 @@ gdk_gl_context_has_frame_terminator (GdkGLContext *context) | ||||
|   return priv->has_frame_terminator; | ||||
| } | ||||
|  | ||||
| gboolean | ||||
| gdk_gl_context_has_tex_param (GdkGLContext *context) | ||||
| { | ||||
|   GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); | ||||
|  | ||||
|   return priv->has_tex_param; | ||||
| } | ||||
|  | ||||
| gboolean | ||||
| gdk_gl_context_has_unpack_subimage (GdkGLContext *context) | ||||
| { | ||||
| @ -829,6 +838,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context) | ||||
|       priv->has_unpack_subimage = epoxy_has_gl_extension ("GL_EXT_unpack_subimage"); | ||||
|       priv->has_sync = priv->gl_version >= 30; | ||||
|       priv->has_texture_format_bgra = epoxy_has_gl_extension ("GL_EXT_texture_format_BGRA8888"); | ||||
|       priv->has_tex_param = priv->gl_version >= 31; | ||||
|     } | ||||
|   else | ||||
|     { | ||||
| @ -838,6 +848,8 @@ gdk_gl_context_check_extensions (GdkGLContext *context) | ||||
|       priv->has_gl_framebuffer_blit = priv->gl_version >= 30 || epoxy_has_gl_extension ("GL_EXT_framebuffer_blit"); | ||||
|       priv->has_frame_terminator = epoxy_has_gl_extension ("GL_GREMEDY_frame_terminator"); | ||||
|       priv->has_unpack_subimage = TRUE; | ||||
|       priv->has_tex_param = priv->gl_version >= 10 && | ||||
|                             epoxy_is_desktop_gl (); | ||||
|       priv->has_sync = priv->gl_version >= 32 || | ||||
|                        epoxy_has_gl_extension ("GL_ARB_sync") || | ||||
|                        epoxy_has_gl_extension ("GL_APPLE_sync"); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user