1. 14 Jun, 2011 12 commits
  2. 13 Jun, 2011 2 commits
    • Robert Bragg's avatar
      cogl-vertex-buffer: make sure to unref weak pipelines · c603dc67
      Robert Bragg authored
      When validating a user pipeline before drawing with a CoglVertexBuffer
      we sometimes find we have to make some overrides and we handle that by
      creating a pipeline which is a weak copy of the user pipeline. The weak
      pipeline gets associated with the original pipeline so if that pipeline
      is used multiple times then we can re-use the same override pipeline and
      skip validation. Because it's a weak pipeline we get notified when the
      original material is destroyed or changed so we know our weak pipeline
      is now invalid.
      
      When we get notified that the weak material is invalid we should unref
      it, but instead we were just discarding our reference to it. This was
      resulting in leaking weak materials and in some cases those materials
      referenced textures which would then also be leaked.
      c603dc67
    • Emmanuele Bassi's avatar
      Do not use "near" and "far" variables · 3d2564df
      Emmanuele Bassi authored
      They collide with existing symbols when compiling on Windows.
      
      http://bugzilla.clutter-project.org/show_bug.cgi?id=2667
      3d2564df
  3. 10 Jun, 2011 2 commits
  4. 09 Jun, 2011 3 commits
  5. 08 Jun, 2011 1 commit
    • Neil Roberts's avatar
      Implement COGL_DEBUG=disable-texturing for ARBFp and GLSL fragends · c3c08048
      Neil Roberts authored
      The COGL_DEBUG=disable-texturing debug variable disables texturing in
      the fixed function fragend by not bothering to enable the texture
      targets. This wasn't working for the programmable fragends because the
      texture targets don't need to be enabled to use them. This patch
      modifies the two programmable backends to generate a constant value
      for the texture lookups in the shader when the debug variable is
      given.
      c3c08048
  6. 01 Jun, 2011 20 commits
    • Robert Bragg's avatar
      gir: pass dep cflags to gobject introspection scanner · bbfe8b8e
      Robert Bragg authored
      The gobject introspection scanner was failing to find EGL headers so we
      now pass the COGL_DEP_CFLAGS to Cogl_1_0_gir_CFLAGS.
      bbfe8b8e
    • Robert Bragg's avatar
      replace _xlib_add_filter use with _cogl_renderer API · 5022ec54
      Robert Bragg authored
      Instead of using _cogl_xlib_add/remove_filter we now use
      _cogl_renderer_add/remove_native_filter. The _cogl_xlib_add_filter API
      was only required as a stop gap while EGL support was still in Clutter
      because in that case we were using the stub winsys and didn't have a
      CoglRenderer.
      5022ec54
    • Robert Bragg's avatar
      remove _cogl_xlib_trap/untrap_errors wrappers · 8c35a6bb
      Robert Bragg authored
      This removes the redundant _cogl_xlib_trap/untrap_errors functions that
      simply wrap equivalent functions in the _cogl_renderer_xlib namespace.
      These were originally only required while the EGL winsys was being
      handled in clutter and so there wasn't a CoglRenderer in all cases.
      8c35a6bb
    • Robert Bragg's avatar
      Adds an example cogl wayland compositor · 43c4b21a
      Robert Bragg authored
      This adds an example cogl compositor to test the
      _cogl_wayland_texture_2d_new_from_buffer API. The compositor emulates 4
      output displays but doesn't support input since Cogl doesn't deal with
      input. It's quite a minimal example of what it takes to write a wayland
      compositor so could be interesting to anyone learning about wayland.
      43c4b21a
    • Robert Bragg's avatar
      egl: fix some #ifdef guards · 4a97fc0a
      Robert Bragg authored
      In the winsys vtable .xlib_get_visual_info and
      .onscreen_x11_get_window_xid should be guarded by the
      COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT because they need to be there
      if cogl is configured with --enable-xlib-egl-platform but not if just
      configured with --enable-xlib.
      4a97fc0a
    • Robert Bragg's avatar
      renderer: set winsys on renderer before ->renderer_connect · b934859d
      Robert Bragg authored
      When iterating through all the possible window systems trying to find
      one we can successfully connect we now associated the current winsys
      vtable with the renderer before calling winsys->renderer_connect in case
      the implementation calls some other Cogl API that expects to be able to
      determine the current winsys. For example calling _cogl_get_proc_address
      when querying winsys extensions as part of a successful connect will
      need to get at the current winsys vtable.
      b934859d
    • Robert Bragg's avatar
      glx: make sure _cogl_winsys_get_proc_address is static · 656f28de
      Robert Bragg authored
      Make sure not to export _cogl_winsys_get_proc_address outside of
      cogl-winsys-glx.c
      656f28de
    • Robert Bragg's avatar
      Adds _cogl_wayland_texture_2d_new_from_buffer API · a29a76db
      Robert Bragg authored
      This adds internal API to be able to wrap a wayland buffer as a
      CoglTexture2D. There is a --enable-wayland-egl-server option to decide
      if Cogl should support this feature and potentially any EGL based winsys
      could support this through the EGL_KHR_image_base and
      EGL_WL_bind_display extensions.
      a29a76db
    • Robert Bragg's avatar
      egl: Add x11 texture-from-pixmap support · 8714d993
      Robert Bragg authored
      By using the EGL_KHR_image_base/pixmap extensions this adds support for
      wrapping X11 pixmaps as CoglTexture2D textures. Clutter will
      automatically take advantage of this if using the
      ClutterX11TexturePixmap actor.
      8714d993
    • Robert Bragg's avatar
      Add _cogl_egl_texture_2d_new_from_image API · 60b25615
      Robert Bragg authored
      This adds an internal texture_2d constructor that can wrap an EGLImage
      as a CoglTexture2D. The plan is to utilize this for texture-from-pixmap
      support with EGL as well as creating textures from wayland buffers.
      60b25615
    • Robert Bragg's avatar
      egl: check or EGL/eglext.h · c9f1541d
      Robert Bragg authored
      While running configure we now check for EGL/eglext.h and if found we
      will substitute an inclusion in cogl-defines.h.
      c9f1541d
    • Robert Bragg's avatar
      egl: Check EGL extension as early as possible · 52aada84
      Robert Bragg authored
      Instead of waiting until initializing a CoglContext we now check EGL
      extensions after calling eglInitialize.
      52aada84
    • Robert Bragg's avatar
      Add internal _cogl_get_proc_address · be15bf75
      Robert Bragg authored
      This adds an internal _cogl_get_proc_address that doesn't need a
      CoglContext. This will enable us to check driver features earlier.
      be15bf75
    • Robert Bragg's avatar
      configure.ac: move the --enable-cairo check · 32e7c93a
      Robert Bragg authored
      This moves the --enable-cairo check because it was put in the middle of
      the logic that handles the --enable-debug option. This moves the
      --enable-cairo check down after the --enable-debug logic and adds a
      comment header to delimit the option like we have for other options.
      32e7c93a
    • Robert Bragg's avatar
      Make stub winsys into a proper winsys backend · b380fed2
      Robert Bragg authored
      Instead of the stub winsys being a special case set of #ifdef'd code
      used when COGL_HAS_FULL_WINSYS wasn't defined, the stub winsys now
      implements a CoglWinsysVtable like all other winsys backends (it's just
      that everything is a NOP). This way we can get rid of the
      COGL_HAS_FULL_WINSYS define and also the stub winsys can be runtime
      selected whereas before it was incompatible with all other winsys
      backends.
      b380fed2
    • Robert Bragg's avatar
      cogl-xlib: remove special cases for stub winsys · 1ec85255
      Robert Bragg authored
      Since we no longer have any xlib based backends in Clutter that depend
      on the stub winsys in Cogl we can now remove all the special case code
      we had for this in cogl-xlib.c
      1ec85255
    • Robert Bragg's avatar
      Make CoglTexture2D public as experimental API · ee7cc9e7
      Robert Bragg authored
      This exposes a CoglTexture2D typedef and adds the following experimental
      API:
          cogl_is_texture_2d
          cogl_texture_2d_new_with_size
          cogl_texture_2d_new_from_data
          cogl_texture_2d_new_from_foreign
      
      Since this is experimental API you need to define
      COGL_ENABLE_EXPERIMENTAL_API before including cogl.h.
      
      Note: With these new entrypoints we now expect a CoglContext pointer to
      be passed in, instead of assuming there is a default context. The aim is
      that for Cogl 2.0 we won't have a default context so this is a step in
      that direction.
      ee7cc9e7
    • Robert Bragg's avatar
      configure: remove the --enable-quartz option · 80e7e0ef
      Robert Bragg authored
      Until we have a standalone quartz winsys we don't want to define a
      winsys name called "quartz" which is what the current --enable-quartz
      option does. For now anyone building for OSX needs to use the stub
      winsys and setup their own GL context.
      80e7e0ef
    • Robert Bragg's avatar
      framebuffer: validate width/height in _set_viewport · 1e3f4f62
      Robert Bragg authored
      This validates that the viewport width and height arguments are positive
      values in _cogl_framebuffer_set_viewport. In addition, just before
      calling glViewport we also assert that something else hasn't gone amiss
      and that the internal viewport width/height values we track are still
      positive before passing to glViewport which generates an error for
      negative values.
      1e3f4f62
    • Robert Bragg's avatar
      Revert "Initial build of a Quartz winsys stub" · 5a9b92a4
      Robert Bragg authored
      This reverts commit b2e41f1b.
      
      We are backing out the quartz specific stub winsys since we can simply
      use the generic stub winsys on quartz until we develop a standalone
      winsys. Since we plan on removing all special cases for the stub winsys
      by handling with a winsys vtable like all the others it's better if we
      don't introduce a quartz specific stub.
      5a9b92a4