summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* examples/cogl-texture-pixmap-x11: Add a --stereo command line optionwip/quadbuffer-stereoOwen W. Taylor2014-07-071-4/+18
| | | | | | 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.
* examples/cogl-x11-tfp: Add a --gears option to run glxgearsOwen W. Taylor2014-07-071-27/+166
| | | | | | 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.
* CoglTexturePixmapX11: add support for stereo contentOwen W. Taylor2014-07-077-44/+250
| | | | | | | | 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.
* Add a simple example of stereo drawingOwen W. Taylor2014-07-032-1/+155
| | | | | Add a new example that draws a triangle floating in the air in front of the screen.
* Add support for setting up stereo CoglOnscreensOwen W. Taylor2014-07-0310-3/+185
| | | | | | | | | | | | | 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.
* examples/cogl-x11-tfp: Fix compilationOwen W. Taylor2014-07-031-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-031-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-031-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> (cherry picked from commit e5f28f1e75db9bdc4f2688f420a74f908f96cf76) Conflicts: cogl/winsys/cogl-winsys-egl-kms.c cogl/winsys/cogl-winsys-egl-x11.c
* 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> (cherry picked from commit 4d892cd97558da61ba526f947ac0555ebab632d2)
* MSVC 2010+ Projects: Update "Installation" ProcessChun-wei Fan2014-06-092-39/+47
| | | | | | | | | | | | | | | Currently, due to the way that Visual Studio 2010+ projects are handled, the "install" project does not re-build upon changes to the sources, as it does not believe that its dependencies have changed, although the changed sources are automatically recompiled. This means that if a part or more of the solution does not build, or if the sources need some other fixes or enhancements, the up-to-date build is not copied automatically, which can be misleading. Improve on the situation by forcing the "install" project to trigger its rebuild, so that the updated binaries can be copied. This does trigger an MSBuild warning, but having that warning is way better than not having an up-to-date build, especially during testing and development.
* 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> (cherry picked from commit 2eec9758f67e9073371c2edd63379324849373c4)
* 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>
* cogl-winsys-egl-kms: Never set EGL_PLATFORMKristian Høgsberg2014-04-302-12/+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>
* framebuffer: Fix linkage from C++ applicationsEmanuele Aina2014-04-221-0/+4
| | | | | | | | | Prevent Cogl function names from being mangled when a C++ compiler is being used by adding some missing COGL_{BEGIN,END}_DECLS guards. https://bugzilla.gnome.org/show_bug.cgi?id=728628 Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl/cogl-gtype-private.h: Fix Build on non-GCCChun-wei Fan2014-04-221-5/+5
| | | | | | | | | | | | Commit 1b2dd815 (Registers gtypes for all public objects and structs) introduced GCCism's in its use of varargs, which broke the build of Cogl on other non-GCC compilers, such as Visual Studio. Define the COGL_GTYPE_DEFINE_BASE_CLASS and COGL_GTYPE_DEFINE_CLASS macros using ISO-style varargs so that the build of Cogl can be fixed on non-GCC compilers. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Visual Studio Builds: Avoid Implicit Link to SDLChun-wei Fan2014-04-1714-46/+52
| | | | | | | | | | Cogl, when built with the SDL winsys, includes the SDL headers in its headers, which causes main() to be defined to SDL's main() wrapper on Windows, which means that SDL2.lib and SDL2main.lib need to be linked to every single program that links to Cogl with the SDL winsys. Avoid this behavior by defining SDL_MAIN_HANDLED in the CFLAGS of the sample and test programs, and let people know that this is the case.
* 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> (cherry picked from commit c3035912833eabe1f6dadbea23c78e595aac79dc)
* Update cogl.symbols and cogl-path.symbolsChun-wei Fan2014-04-162-6/+124
| | | | | | | | | | In Lionel's work for supporting introspection better for Cogl, a number of public symbols were added for Cogl and Cogl-Path, so add these symbols to cogl.symbols and cogl-path.symbols so that they can be exported, which will fix the build of the Cogl conformance test and the introspection files for the Windows-based builds. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Visual Studio Builds: Update .def Files GenerationChun-wei Fan2014-04-072-6/+6
| | | | | Define COGL_HAS_GTYPE_SUPPORT during the preprocessing of the .symbols files so that the _get_gtype symbols can be exported.
* Visual Studio Builds: Update README.txt'sChun-wei Fan2014-04-072-32/+44
| | | | | | | Let people know that for Visual Studio builds GLib is a hard requirement, and let the people also know that SDL-2.x is now used for builds supporting the SDL winsys. Also let people know that current situation regarding building and linking Cogl applications with the SDL winsys built in.
* Post-release version bump to 1.18.1Neil Roberts2014-03-211-2/+2
|
* Release 1.18.0 (relase)1.18.0Neil Roberts2014-03-211-5/+5
|
* Updates NEWS for the 1.18.0 releaseNeil Roberts2014-03-211-0/+39
|
* 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> (cherry picked from commit f5f0342315e524523c50549e91eb9ff1683ab558)
* Don't use the internal _G_DEFINE_TYPE_EXTENDED_CLASS_INIT macroNeil Roberts2014-03-211-1/+6
| | | | | | | | | This macro is internal to gobject so using it risks breaking Cogl if glib changes its API. Instead we just use its expansion. Note that glib provides two expansions for this depending on the glib version but this only uses the one for older versions. Reviewed-by: Robert Bragg <robert.bragg@intel.com>
* cogl-gst-video-sink: Fix a call to g_return_val_if_failNeil Roberts2014-03-211-1/+1
| | | | | | cogl_gst_video_sink_get_natural_size was using g_return_val_if_fail but its return type is void. For some reason GCC doesn't complain about this but it causes a compile error on clang.
* Revert "cogl-gst: add missing Cogl introspection dependency"Neil Roberts2014-03-211-1/+0
| | | | | | | | | | The pkg-config file might not necessarily be installed yet so I don't think it makes sense to try and include it when running g-ir-scanner. Presumably it should pick up the headers from source directory instead of the installed directory. It seems to build without this patch so let's just revert it. This reverts commit d9c8570f14a43e6c3a48c521e819427f02e816e4.
* onscreen: make closure types visible to introspectionLionel Landwerlin2014-03-212-0/+50
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* examples: add gjs exampleLionel Landwerlin2014-03-212-0/+47
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* example: add emscripten files to distLionel Landwerlin2014-03-211-0/+2
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-gtype: add missing gtype macros in intermediate macrosLionel Landwerlin2014-03-214-10/+8
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-gst: add missing Cogl introspection dependencyLionel Landwerlin2014-03-211-0/+1
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Registers gtypes for all public objects and structsLionel Landwerlin2014-03-2079-41/+1098
| | | | | | | | | | This adds much more comprehensive support for gobject-introspection based bindings by registering all objects as fundamental types that inherit from CoglObject, and all structs as boxed types. Co-Author: Robert Bragg <robert@linux.intel.com> Reviewed-by: Neil Roberts <neil@linux.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>
* Update cogl-path.symbolsChun-wei Fan2014-03-201-0/+1
| | | | | | One symbol was missed when the cogl-path code was split out from Cogl... Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Update cogl.symbolsChun-wei Fan2014-03-201-54/+23
| | | | | | | | | Remove the symbols that are now in cogl-path (where cogl-path.symbols already include), and add the symbols that were added to the Cogl API. Also add internal symbols as required by cogl-path and cogl-pango. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* 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>
* cogl-gst-plugin: Fix the license name in the plugin descriptionNeil Roberts2014-03-201-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> (cherry picked from commit ceec0bddb858588c1f04c50dd6cbda9eb044c4cc)
* Expose EGL context/display and GLX contextRobert Bragg2014-03-208-29/+148
| | | | | | | | | | | | | | | | | | | | To help facilitate integration with third party frameworks this exposes the EGL context and display to applications as well as the GLX context. (Note that the GLX display is already available via cogl_xlib_renderer_get_display()) This adds a new top-level <cogl/cogl-glx.h> header that needs to be included explicitly to access the glx specific api. Anyone using these apis will be responsible for checking that Cogl is indeed using EGL or GLX by calling cogl_renderer_get_winsys_id() This will enable GStreamer, for example, to be able to create a GL context that shares resources with Cogl's context. https://bugzilla.gnome.org/show_bug.cgi?id=724992 Reviewed-by: Neil Roberts <neil@linux.intel.com>
* move GLeglImageOES define into cogl-egl-private.hRobert Bragg2014-03-204-10/+85
| | | | | | | | | | This splits out the GLeglImageOES define in cogl-egl.h into a private cogl-egl-private.h header and updates the guards in cogl-egl.h to be consistent with other top-level headers where we need to be careful about how __COGL_H_INSIDE__ is defined and undefined, esp when the gobject introspection scanner is running. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* egl: remove NativeWindowType/NativeDisplayType definesRobert Bragg2014-03-208-16/+9
| | | | | | | | | | This ensures we use EGLNativeWindowType and EGLNativeDisplayType everywhere instead. The previous names come from EGL 1.2 but it seems reasonable to require more recent EGL versions. If someone wanted to add compatibility for EGL 1.2 later it would be straightforward to define the new names to the old. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* sdl2: fix GL driver selectionRobert Bragg2014-03-201-4/+16
| | | | | | | | | SDL2 supports selecting between full OpenGL or OpenGL ES 1/2 but our selection code was written before SDL 2.0 was officially released and since then a new SDL_GL_CONTEXT_PROFILE_MASK attribute was added and we have to explicitly set the SDL_GL_CONTEXT_MINOR_VERSION attribute. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-gst: add cogl_gst_video_sink_get_natural_size() apiRobert Bragg2014-03-202-0/+119
| | | | | | | | | This adds api for querying a "natural" width and height for a video which has the correct aspect ratio for displaying on square, 1:1 pixels. The natural size is the minimum size where downscaling is not required. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* basic-video-player: don't try and sample mipmapRobert Bragg2014-03-201-16/+0
| | | | | | | | | | | | Since we don't generate a mipmap chain for uploaded video frames this avoids setting the min filter to COGL_PIPELINE_FILTER_LINEAR_MIPMAP_LINEAR. Since COGL_PIPELINE_FILTER_LINEAR is the default and since it is also dubious that cogl-basic-video-player is directly manipulating layers that are conceptually internal to cogl-gst this removes the loop that updates the filtering for cogl-gst layers. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-gst: allocate textures synchronouslyRobert Bragg2014-03-201-3/+10
| | | | | | | | | | | | | | | This makes sure video textures being uploaded via video_texture_new_from_data are allocated before the function returns. This function create a CoglBitmap to wrap the data from gstreamer and by allowing cogl to allocate the texture lazily it's possible that the data being pointed to by the bitmap won't remain valid until we actually come to allocate the texture. Note: we don't simply use cogl_texture_2d_[sliced_]new_from_data() here because we need to be able to call cogl_texture_set_premultiplied() before allocating the texture. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Expose COGL_FEATURE_ID_BUFFER_AGE feature idRobert Bragg2014-03-204-3/+18
| | | | | | | | | This adds a new COGL_FEATURE_ID_BUFFER_AGE feature id that can be used to determine if cogl_onscreen_get_buffer_age() will ever return an age other than 0. This should be used instead of querying the winsys feature via cogl_clutter_winsys_has_feature(). Reviewed-by: Neil Roberts <neil@linux.intel.com>
* glx-feature-functions: update misleading commentRobert Bragg2014-03-201-1/+1
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>