goto fail;
}
- if (!glamor_gl_has_extension("GL_EXT_texture_format_BGRA8888")) {
+ if (!epoxy_has_gl_extension("GL_EXT_texture_format_BGRA8888")) {
ErrorF("GL_EXT_texture_format_BGRA8888 required\n");
goto fail;
}
}
- glamor_priv->has_khr_debug = glamor_gl_has_extension("GL_KHR_debug");
+ glamor_priv->has_khr_debug = epoxy_has_gl_extension("GL_KHR_debug");
glamor_priv->has_pack_invert =
- glamor_gl_has_extension("GL_MESA_pack_invert");
+ epoxy_has_gl_extension("GL_MESA_pack_invert");
glamor_priv->has_fbo_blit =
- glamor_gl_has_extension("GL_EXT_framebuffer_blit");
+ epoxy_has_gl_extension("GL_EXT_framebuffer_blit");
glamor_priv->has_buffer_storage =
- glamor_gl_has_extension("GL_ARB_buffer_storage");
+ epoxy_has_gl_extension("GL_ARB_buffer_storage");
glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &glamor_priv->max_fbo_size);
#ifdef MAX_FBO_SIZE
glamor_priv->max_fbo_size = MAX_FBO_SIZE;
return ret;
}
-/* Borrow from cairo. */
-Bool
-glamor_gl_has_extension(const char *extension)
-{
- const char *pext;
- int ext_len;
-
- ext_len = strlen(extension);
-
- pext = (const char *) glGetString(GL_EXTENSIONS);
-
- if (pext == NULL || extension == NULL)
- return FALSE;
-
- while ((pext = strstr(pext, extension)) != NULL) {
- if (pext[ext_len] == ' ' || pext[ext_len] == '\0')
- return TRUE;
- pext += ext_len;
- }
- return FALSE;
-}
-
int
glamor_gl_get_version(void)
{
Bool glamor_set_planemask(PixmapPtr pixmap, unsigned long planemask);
Bool glamor_change_window_attributes(WindowPtr pWin, unsigned long mask);
RegionPtr glamor_bitmap_to_region(PixmapPtr pixmap);
-Bool glamor_gl_has_extension(const char *extension);
int glamor_gl_get_version(void);
#define GLAMOR_GL_VERSION_ENCODE(major, minor) ( \