summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* wayland-winsys: Provide a wl_registry.global_remove callbackwip/cogl-2.0Rui Matos2015-01-301-0/+9
| | | | | | Otherwise libwayland-client will abort() when we get that event. https://bugzilla.gnome.org/show_bug.cgi?id=743594
* kms-winsys: Mark the framebuffer to be bound when setting a new layoutRui Matos2015-01-301-0/+2
| | | | | | We need to bind the context to the new EGL surface we just created. https://bugzilla.gnome.org/show_bug.cgi?id=741881
* Support automake 1.15Ting-Wei Lan2015-01-291-1/+1
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=743688 Reviewed-by: Robert Bragg <robert@sixbynine.org>
* Updated Turkish translationMuhammet Kara2014-12-101-119/+139
|
* Added Romanian TranslationDaniel Șerbănescu2014-11-301-0/+364
|
* cogl-kms-display: Fix doc commentAdel Gadllah2014-10-031-1/+1
|
* Updated Korean translationSeong-ho Cho2014-09-091-174/+187
|
* Updated Greek translationMarMav2014-08-131-295/+233
|
* Updated Basque languageInaki Larranaga Murgoitio2014-08-051-111/+127
|
* doap category coreOlav Vitters2014-07-301-0/+1
|
* examples/cogl-texture-pixmap-x11: Add a --stereo command line optionOwen W. Taylor2014-07-171-6/+33
| | | | | | | | 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>
* examples/cogl-x11-tfp: Add a --gears option to run glxgearsOwen W. Taylor2014-07-171-26/+151
| | | | | | | | 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>
* CoglTexturePixmapX11: add support for stereo contentOwen W. Taylor2014-07-177-44/+253
| | | | | | | | | | 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 simple example of stereo drawingOwen W. Taylor2014-07-172-1/+155
| | | | | | | 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>
* Add support for setting up stereo CoglOnscreensOwen W. Taylor2014-07-1710-3/+186
| | | | | | | | | | | | | | | 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>
* examples/cogl-x11-tfp: Fix compilationOwen W. Taylor2014-07-171-1/+3
| | | | | Fix a couple of minor compilation problems from a bad rebase - a missing label and a missing variable.
* examples/cogl-x11-tfp.c: Handle WM_DELETE_WINDOWOwen W. Taylor2014-07-171-0/+12
| | | | | | | | 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>
* examples/cogl-x11-tfp.c: Wait for the window to be mappedOwen W. Taylor2014-07-171-1/+10
| | | | | | | | | | 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>
* kms-winsys: Add api that tells cogl to ignore a crtcAdel Gadllah2014-06-303-2/+42
| | | | | | | | 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
* kms_winsys: Add cogl_kms_renderer_get_gbm apiAdel Gadllah2014-06-302-0/+15
| | | | | | Applications might want to get the underlying gbm device so add a getter for it. https://bugzilla.gnome.org/show_bug.cgi?id=730536
* Use the EGL_KHR_surfacless_context extensionNeil Roberts2014-06-178-71/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add a COGL_EXT_IN_GLES3 option to specify extensions that are in GLES3Neil Roberts2014-06-176-42/+102
| | | | | | | | | | 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>
* atlas-texture: Keep reference on potential destination atlasFelix Riemann2014-05-191-9/+19
| | | | | | | | | 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>
* cogl-winsys-egl-kms: Call swap notify handler even when pageflip ioctl failsKristian Høgsberg2014-04-301-13/+28
| | | | | | | | | | | | | 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)
* cogl-winsys-egl-kms: Never set EGL_PLATFORMKristian Høgsberg2014-04-301-6/+0
| | | | | | | | | | | | | | | | | | | | | 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.
* MSVC Builds: Don't Link to SDL AutomaticallyChun-wei Fan2014-04-161-9/+0
| | | | | | | | | | | | | | 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>
* doap: update URLsPiotr Drąg2014-03-301-3/+3
|
* mingw: Try adding a -w64 suffix when searching for a suitable compilerNeil Roberts2014-03-211-1/+1
| | | | | | | | 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>
* cogl-pango-pipeline-cache.c: Include forgotten headerChun-wei Fan2014-03-201-0/+1
| | | | | | | | | 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)
* cogl/cogl-renderer.c: Avoid Clash with Newer Windows SDKsChun-wei Fan2014-03-201-3/+3
| | | | | | | | | | | 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)
* cogl-gst-plugin: Fix the license name in the plugin descriptionNeil Roberts2014-03-141-1/+1
| | | | | | | | | 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>
* Set COGL_WINSYS_FEATURE_BUFFER_AGE on EGLNeil Roberts2014-03-141-0/+5
| | | | | | | | | | | 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>
* cogl-winsys-egl-kms: Make sure to close our connection to DRM at shutdownJasper St. Pierre2014-03-121-0/+3
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-winsys-egl-kms: Add cogl_kms_renderer_set_kms_fdJasper St. Pierre2014-03-124-8/+56
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-winsys-egl-wayland: Report an error if we can't find the globals we needJasper St. Pierre2014-03-121-6/+10
| | | | | | | | | | | | 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>
* kms: include stddef.h before drm.hAndreas Oberritter2014-02-201-0/+1
| | | | | | | | | | | | 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>
* Allocate immediately in _cogl_egl_texture_2d_new_from_imageNeil Roberts2014-02-201-1/+10
| | | | | | | | | | | | | | | | | | | 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>
* Don't dereference an unitialised pointer in _cogl_container_ofNeil Roberts2014-02-196-32/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Updated Ukrainian translationDaniel Korostil2014-02-141-99/+121
|
* Updated FSF's addressDaniel Mustieles2014-01-3167-193/+67
|
* cogl-basic-video-player: Allow passing a GStreamer pipelineNeil Roberts2014-01-311-12/+122
| | | | | | | | | | | | | | 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>
* cogl-gst: Fix get_caps implementation when no context is setNeil Roberts2014-01-311-1/+5
| | | | | | | | | | | | | | 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>
* cogl-gst: video-sink: add NV12 supportNeil Roberts2014-01-311-6/+111
| | | | | | | | | | | | | | | | | | 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>
* cogl-gst-video-sink: Premultiply the colors coming from the videoNeil Roberts2014-01-312-38/+125
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update Chinese simplified translationWylmer Wang2014-01-241-105/+100
|
* cogl-gst: video-sink: fix not installed rgb shaderLionel Landwerlin2014-01-221-1/+3
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* mingw-fetch-dependencies: Add the -L option when using curlNeil Roberts2014-01-201-1/+1
| | | | | | | 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>
* winsys-wgl: Don't include cogl.hNeil Roberts2014-01-201-2/+0
| | | | | | | | 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>
* Set the COGL_BITWISE_BIT flag for the formats with 10-bit componentsNeil Roberts2014-01-201-9/+9
| | | | | | | | | 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>
* Add support for RG texturesNeil Roberts2014-01-2015-16/+283
| | | | | | | | | | | | | | | | | | 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>