| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Otherwise libwayland-client will abort() when we get that event.
https://bugzilla.gnome.org/show_bug.cgi?id=743594
|
|
|
|
|
|
| |
We need to bind the context to the new EGL surface we just created.
https://bugzilla.gnome.org/show_bug.cgi?id=741881
|
|
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=743688
Reviewed-by: Robert Bragg <robert@sixbynine.org>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
If --stereo is passed, then the texture pixmap is created as a stereo
texture pixmap, and also, if passed in conjunction with --gears,
glxgears is also run with the -stereo option.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
|
|
|
| |
If --gears is passed on the command line, glxgears is run, and
is used for the source window rather than drawing solid rectangles
into a window we create outselves.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Add cogl_texture_pixmap_x11_new_left() and
cogl_texture_pixmap_x11_new_right() (which takes the left texture
as an argument) for texture pixmap rendering with stereo content.
The underlying GLXPixmap is created using a stereo visual and shared
between the left and right textures.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
|
|
| |
Add a new example that draws a triangle floating in the air in
front of the screen.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we want to show quad-buffer stereo with Cogl, we need to pick an
appropriate fbconfig for creating the CoglOnscreen objects. Add
cogl_onscreen_template_set_stereo_enabled() to indicate whether
stereo support is needed.
Add cogl_framebuffer_get_stereo_mode() to see if a framebuffer was
created with stereo support.
Add cogl_framebuffer_get_stereo_mode() to pick whether to draw to
the left, right, or both buffers.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
| |
Fix a couple of minor compilation problems from a bad rebase - a
missing label and a missing variable.
|
|
|
|
|
|
|
|
| |
Clean up cleanly when closed rather than dying with an X Error -
we do this by advertising support for the WM_DELETE_WINDOW protocol
and handling the client message.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Wait for the main window (and hence the window we create within
the main window to redirect) to be mapped and become viewable
before we try to call XCompositeNameWindowPixmap() -
XComposeNameWindowPixmap() produces a BadMatch error on a
non-viewable window.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
|
|
|
| |
An application might for whatever reason want to control a specific output
directly and have cogl only swap the other outputs if any. So add an api that
allows setting a crtc to be ignored.
https://bugzilla.gnome.org/show_bug.cgi?id=730536
|
|
|
|
|
|
| |
Applications might want to get the underlying gbm device so add a getter for it.
https://bugzilla.gnome.org/show_bug.cgi?id=730536
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The surfaceless context extension can be used to bind a context
without a surface. We can use this to avoid creating a dummy surface
when the CoglContext is first created. Otherwise we have to have the
dummy surface so that we can bind it before the first onscreen is
created.
The main awkward part of this patch is that theoretically according to
the GL and GLES spec if you first bind a context without a surface
then the default state for glDrawBuffers is GL_NONE instead of
GL_BACK. In practice Mesa doesn't seem to do this but we need to be
robust against a GL implementation that does. Therefore we track when
the CoglContext is first used with a CoglOnscreen and force the
glDrawBuffers state to be GL_BACK.
There is a further awkward part in that GLES2 doesn't actually have a
glDrawBuffers state but GLES3 does. GLES3 also defaults to GL_NONE in
this case so if GLES3 is available then we have to be sure to set the
state to GL_BACK. As far as I can tell that actually makes GLES3
incompatible with GLES2 because in theory if the application is not
aware of GLES3 then it should be able to assume the draw buffer is
always GL_BACK.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Some features that were previously available as an extension in GLES2
are now in core in GLES3 so we should be able to specify that with the
gles_availability mask of COGL_EXT_BEGIN so that GL implementations
advertising GLES3 don't have to additionally advertise the extension
for us to take advantage of it.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
|
|
|
|
| |
When a new CoglAtlasTexture tries to fit into an existing CoglAtlas
it should make sure the atlas stays valid while it expands.
https://bugzilla.gnome.org/show_bug.cgi?id=728064
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This can happen when we dpms off the output or when login1 takes away
drm master status from our drm fd. In either case, we need to call
the swap notify handler so that the compositor dosn't get stuck waiting
for that notification. The compositor should stop repainting shortly in
both cases, as it's either going into dpms off mode or vt switching away.
https://bugzilla.gnome.org/show_bug.cgi?id=728979
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 22378d572b039e4fe6ceb56e56492470bb461d48)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This environment variable predates the reliable platform detection in mesa
and typically just causes crashes when the specified platform doesn't
match what's passed in. Aside from being unecessary and problematic
it also leaks into the GNOME session, preventing clients from
automatically detecting the wayland platform.
https://bugzilla.gnome.org/show_bug.cgi?id=728978
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 8fb9cea4515161effdaee256dd033c36cfa21689)
Note while forward-porting: On master this patch only affects the
Wayland winsys. The KMS winsys never set EGL_PLATFORM on master
because that was introduced in commit dab054200cb2135da2303 which was
only applied to the 1.18 branch. That patch was only made to override
the environment variable if the Wayland winsys is tried before the KMS
winsys.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove #pragma directives that causes any applications that use Cogl to
link to the SDL libraries when Cogl was built with the SDL winsys. This is
mainly due to the availability of both SDL-1.x and SDL-2.x support in the
SDL winsys, where different libraries are linked for SDL-1.x and SDL-2.x.
To avoid having to link to the SDL/SDL2 libraries when the application code
is not directly using SDL/SDL2, define SDL_MAIN_HANDLED in the CFLAGS so
that SDL's wrapper main() implementation will not be used when the
application is being built.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
| |
|
|
|
|
|
|
|
|
| |
On 64-bit fedora the 32-bit MinGW compiler is called
i686-w64-mingw32-gcc which wasn't being picked up by the
mingw-fetch-depdencies script.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
|
|
|
|
| |
The private header is needed as the cogl_texture_get_format API was made
private, so that C4013 (implicit declaration of ...) warnings/errors can
be avoided
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit bb10532f4b11cba169ace6d9e26543fe6f70ad8f)
|
|
|
|
|
|
|
|
|
|
|
| |
The DriverCallback is a function that is defined by the Windows SDK 8.0+
headers, which was initially used for device driver development. The use
of DriverCallback would cause a clash, causing things to break when built
with newer Windows SDKs, so rename DriverCallback to CoglDriverCallback to
avoid this problem.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 001cffd783cfcce9f68bd976891f11760b2f89cc)
|
|
|
|
|
|
|
|
|
| |
In commit 1b83ef938f the license in the plugin description was changed
from “LGPL” to “MIT”. GStreamer strictly whitelists the names of the
licenses and the correct name for the MIT license is “MIT/X11” so it
was rejecting the plugin.
Reviewed-by: Robert Bragg <robert.bragg@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This winsys feature flag is exposed via the deprecated
cogl_clutter_winsys_has_feature function and Clutter is curently
relying on it. Previously the EGL winsys was only setting the internal
COGL_EGL_WINSYS_FEATURE_BUFFER_AGE flag and there was no mapping to
the public flag. Therefore the feature would only be used on GLX. This
patch just adds the mapping.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
| |
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
| |
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of spinning forever, do a roundtrip, which guarantees that the
global messages have been sent by the time we read the sync message.
If the proper globals aren't initialized yet, error out immediately. This
does mean that users can't use CoglOnscreen with foreign custom surface
types without xdg_shell, but when a use case comes for this, we'll
investigate then...
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not doing so leads to the following error, if stddef.h is not included
indirectly through EGL headers:
| libdrm/drm.h:132:2: error: unknown type name 'size_t'
| size_t name_len; /**< Length of name buffer */
Signed-off-by: Andreas Oberritter <obi@saftware.de>
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The _cogl_egl_texture_2d_new_from_image function has a CoglError
argument which implies that it is unlike the other texture
constructors and returns errors immediately rather than having a
delayed-allocation mechanism. cogl_wayland_texture_2d_new_from_buffer
which calls it is also like this. We can't rely on delayed-allocation
semantics for this without changing the applications because the
texture needs to be allocated before the corresponding EGLImage is
destroyed. This patch just makes it immediately allocate.
A better patch might be to remove the error argument to make it
obvious that there are delayed-allocation semantics and then fix all
of the applications.
This was breaking Cogland and Mutter.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous implementation was dereferencing the sample pointer in
order to get the offset to subtract from the member pointer. The
resulting value is then only used to get a pointer to the member in
order to calculate the offset so it doesn't actually read from the
memory location and shouldn't cause any problems. However this is
probably technically invalid and could have undefined behaviour. It
looks like clang takes advantage of this undefined behaviour and
doesn't actually offset the pointer. It also generates a warning when
it does this.
This patch splits the _cogl_container_of macro into two
implementations. Previously the macro was always used in the list
iterator macros like this:
SomeType *sample = _cogl_container_of(list_node, sample, link)
Instead of doing that there is now a new macro called
_cogl_list_set_iterator which explicitly assigns to the sample pointer
with an initial value before assigning to it again with the real
offset. This redundant initialisation gets optimised out by compiler.
The second macro is still called _cogl_container_of but instead of
taking a sample pointer it just directly takes the type name. That way
it can use the standard offsetof macro.
https://bugzilla.gnome.org/show_bug.cgi?id=723530
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the URI argument given on the command line doesn't look like a URI
then the basic video player will now try to parse it as a GStreamer
pipeline description. The pipeline must contain a coglsink element
which the player will look for. This can be used to test Cogl GST. For
example, to test NV12 this can be used:
./cogl-basic-video-player 'videotestsrc !
video/x-raw,format=(string)NV12 !
coglsink'
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If no context is set on the CoglGstVideoSink then it would previously
call gst_caps_ref with a NULL pointer. This patch makes it just return
NULL instead. I think that is a valid thing to do because that is what
gst_base_sink_default_get_caps does. If we don't do this then it's not
possible to use CoglGstVideoSink with GstParse because that tries to
link the pipeline after parsing the string. That was previously
causing a critical error because the freshly parsed sink doesn't have
a CoglContext.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Lionel Landwerlin <llandwerlin@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a cogl-gst renderer to decode NV12 data. NV12 is split into
two buffers, one for the luma component and another for the two
chrominance components at a quarter of the resolution. The second
buffer is uploaded to a two-component RG texture. RG-component
textures are only supported if COGL_FEATURE_ID_TEXTURE_RG is
advertised by Cogl so the NV12 cap is also only advertised when that
is available.
Based on a patch by Lionel Landwerlin which was in turn based on a
patch from Edward Hervey and Matthieu Bouron for Clutter-Gst:
https://bugzilla.gnome.org/show_bug.cgi?id=712832
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Lionel Landwerlin <llandwerlin@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 99a53c82e9ab0a1e5 removed the internal format argument when
uploading a video frame to a texture so that the format will just be
determined automatically from the image format. However this also
leaves the premultiplied state at the default and the default is TRUE.
That means that when we upload RGBA data Cogl will do a premultiplied
conversion on the CPU. We probably don't want to be putting a CPU
conversion in the way of video frames so this patch changes it to set
the premultiplied state to FALSE on the textures and then do the
premultiplied conversion in the shader.
This is particularly important for AYUV which uses the alpha channel
for the V component so doing a premultiplied conversion on the CPU
just creates garbage and messes up the image.
The RGB and RGBA renderers have each been split into two; one that
uses GLSL and one that uses a regular pipeline. The RGBA pipeline
without GLSL is then changed to use 2 layers so we that we can do the
premultiplied conversion in the second layer with a special layer
combine string.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
| |
|
|
|
|
| |
Reviewed-by: Neil Roberts <neil@linux.intel.com>
|
|
|
|
|
|
|
| |
The -L option makes curl follow redirections. This is needed for
downloading glext.h because khronos.org is using a redirect.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Since 248a76f5eac7e5ae4fb45208577f9a55360812a7 cogl.h can no longer be
included in internal source files so the WGL winsys was no longer
compiling.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
The texture formats which have 10-bit components are necessarily not
byte-aligned so they ought to have the COGL_BITWISE_BIT flag. This
flag is enough to make them unique so they no longer need a new enum
value. The last enum value is therefore reset back to 1.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds COGL_PIXEL_FORMAT_RG_88 and COGL_TEXTURE_COMPONENTS_RG in
order to support two-component textures. The RG components for a
texture is only supported if COGL_FEATURE_ID_TEXTURE_RG is advertised.
This is only available on GL 3, GL 2 with the GL_ARB_texture_rg
extension or GLES with the GL_EXT_texture_rg extension. The RG pixel
format is always supported for images because Cogl can easily do the
conversion if an application uses this format to upload to a texture
with a different format.
If an application tries to create an RG texture when the feature isn't
supported then it will raise an error when the texture is allocated.
https://bugzilla.gnome.org/show_bug.cgi?id=712830
Reviewed-by: Robert Bragg <robert@linux.intel.com>
|