Commit graph

7 commits

Author SHA1 Message Date
Bryce Harrington
8ff3019f51 gl: Add support for OpenGL ES 3.0
This improves the OpenGL ES support to extend it to version 3.0.
A number of new features are available in glesv3 including creation of
multi-sampled renderbuffers.  These renderbuffers can be blitted to
single sample textures (but not the other way around).  Other features
such as PBO for image uploading, are left as followon work.

For this preliminary implementation, glesv3 backends always create
renderbuffers, which can be set as single sample or multisample.  The
renderbuffer's content is blitted to the texture only when used as a
source or a mask.

Images uploaded to a texture stay there until the surface is used as a
rendering target, at which point its painted to the renderbuffer.

This patch is heavily based off of Henry Song's initial GLESv3 patch
6f7f3795 from his cairogles fork of Cairo, and incorporates subsequent
fixes and pertinent refactorings from his trunk and review feedback from
Uli.

This implements the *functional* support for glesv3, excluding the
various optimization work to utilize its features.  Rendering and
performance should not be expected to improve notably from pure glesv2.
As the GL backend for Cairo remains "experimental", these changes should
likewise be considered as such.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2017-09-13 15:18:04 -07:00
Chris Wilson
2786864306 gl: Compile fix, missing include cairo-pattern-private.h
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-18 10:31:25 +01:00
Alexandros Frantzis
2472ed899c gl: Fix build issues for GLES2
The glReadBuffer/glDrawBuffer functions are not present in GLES2, only
a single buffer is supported.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-05-10 08:35:26 +01:00
Alexandros Frantzis
7cf9893546 gl: Replace GLEW by using the facilities provided by cairo-gl-info 2010-12-15 15:32:20 +00:00
Andrea Canciani
836f616659 gl: support single stop gradients 2010-06-10 16:07:42 +02:00
Benjamin Otte
39143400dd gl: Add a gradient texture cache
For firefox-planet-gnome, 19135 times a gradient gets rendered using
only 10 different gradients. So we get a 100% hit rate in the cache.
Unfortunately, texture upload is not the biggest problem of this test,
as the performance increase is only moderate - at least on i965:
34.3s => 33.5s
2010-06-07 13:37:49 +02:00
Benjamin Otte
35e219d08f gl: Make gradient textures a separate object
This is necessary so we can do proper refcounting and don't delete the
gradient texture prematurely.
2010-06-07 13:37:49 +02:00