Commit Graph

16 Commits

Author SHA1 Message Date
Tomeu Vizoso
93d0de1d9a Mass rename CLUTTER_COMPILATION to COGL_COMPILATION
Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit a99512e5798e48ffa3a9a1a7eb98bc55647ee1b6)
2012-08-06 14:27:45 +01:00
Emmanuele Bassi
bc37250841 Ensure that the CoglPango GIR is built against the correct libcogl
If we don't specify the dependency we may end up linking against a stale
libcogl.la, or, worse, a globally installed one.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-02-15 14:57:31 +00:00
Chun-wei Fan
330146557d Bug 664827: Autotools changes for Windows .rc files
This will make autotools fill in the versioning info for the COGL/
COGL-Pango .rc files and distribute the resulting .rc files
2011-12-15 20:31:31 +08:00
Chun-wei Fan
2055f6ba91 VS 2008/2010 project files to build Cogl
These are the VS 2008/2010 project files to build Cogl, with a README.txt
to explain the process involved.

Note that the Cogl and Cogl-Pango projects (and filters for VS2010) are
expanded with the correct source file listings during "make dist", which
is done to simplify maintenance of these project files.

-added preconfigured config.h(.win32.in), which is expanded with the
 correct versioining info during autogen
-added preconfigued cogl/cogl-defines.h.win32
-added symbols files for cogl and cogl-pango
-Have configure.ac expand the config.h.win32.in into config.h.win32
 with the correct versioning info, etc, and to include the Visual C++
 project files for distribution
-Added rules in cogl/Makefile.am to expand the cogl VS 2008/2010 projects
 and filters from the templates with up-to-date source file listings, to
 distribute cogl-enum-types.c, cogl-enum-types.h to ease compilation and
 to avoid depending on PERL on Windows installations.
-Added rules in cogl-pango/Makefile.am to expand the cogl-pango VS2008/
 2010 projects and filters from the templates with up-to-date source file
 listings.
-Added/edited various Makefile.am's in build to distribute the VS2008/2010
 project files and associated items required for the build.
-Update .gitignore. There needs to be a pre-configured
 config.h(.win32) and its template, config.h.win32.in for Visual C++
 builds

https://bugzilla.gnome.org/show_bug.cgi?id=650020

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-11-25 13:12:45 +00:00
Neil Roberts
d706991579 cogl-flags: Add some macros to help iterate the bits
This adds some macros to iterate over all the bits set in an array of
flags. The macros are a bit awkward because it tries to avoid using a
callback pointer so that the code is inlined.

cogl_bitmask is now using these macros as well so that the logic can
be shared.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-11-16 16:32:00 +00:00
Neil Roberts
5aab8a2310 Add an option to avoid defining G_DISABLE_DEPRECATED
G_DISABLE_DEPRECATED is only intended for developers of Cogl and it
sometimes breaks the build for people just trying to build a
release. This patch adds an option to enable deprecated Glib
features. By default it is enabled for non-git versions of Cogl.

The patch is based on similar code in Clutter except it adds the flags
to COGL_EXTRA_CFLAGS instead of having a separate variable.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-09-27 10:27:19 +01:00
Robert Bragg
5012bcf1d1 build: only have libcogl-pango depend on pango
Only cogl-pango needs a dependency on pangocairo so we are now careful to
separate the pangocairo pkg-config flags from the others so we can avoid
having libcogl builds refer to them.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2011-08-12 15:28:42 +01:00
Alexandre Rostovtsev
565e2cabd8 cogl-pango: prevent linking to system cogl during make install
At the moment, on make install, libcogl-pango will link to the
version of libcogl that is installed system wide. This leads to
interesting problems when the version installed system wide is
incompatible with the version of cogl being built.

E.g., when building cogl-1.7.4 (with --enable-cogl-pango and
--prefix=/usr) on a system that has cogl-1.7.2 installed in /usr:

$ make
[...]
$ ldd cogl-pango/.libs/libcogl-pango.so | grep cogl
	libcogl.so.2 => /var/tmp/cogl-1.7.4/cogl/.libs/libcogl.so.2 (0x00007eff4bfb2000)
$ make DESTDIR=/var/tmp/cogl-1.7.4/dest install
[...]
$ ldd /var/tmp/cogl-1.7.4/dest/usr/lib64/libcogl-pango.so | grep cogl
	libcogl.so.1 => /usr/lib64/libcogl.so.1 (0x00007f4647747000)

This problem can be avoided by reordering libcogl_pango_la_LIBADD
to ensure that during make installs' relinking phase, libtool looks
at the libcogl in the build directory before the system wide libcogl.

https://bugzilla.gnome.org/show_bug.cgi?id=655026

Reviewed-By: Robert Bragg <robert@linux.intel.com>
Reviewed-By: Emmanuele Bassi <ebassi@linux.intel.com>
2011-07-27 18:21:27 +01:00
Neil Roberts
b2e735ff7f Dynamically load the GL or GLES library
The GL or GLES library is now dynamically loaded by the CoglRenderer
so that it can choose between GL, GLES1 and GLES2 at runtime. The
library is loaded by the renderer because it needs to be done before
calling eglInitialize. There is a new environment variable called
COGL_DRIVER to choose between gl, gles1 or gles2.

The #ifdefs for HAVE_COGL_GL, HAVE_COGL_GLES and HAVE_COGL_GLES2 have
been changed so that they don't assume the ifdefs are mutually
exclusive. They haven't been removed entirely so that it's possible to
compile the GLES backends without the the enums from the GL headers.

When using GLX the winsys additionally dynamically loads libGL because
that also contains the GLX API. It can't be linked in directly because
that would probably conflict with the GLES API if the EGL is
selected. When compiling with EGL support the library links directly
to libEGL because it doesn't contain any GL API so it shouldn't have
any conflicts.

When building for WGL or OSX Cogl still directly links against the GL
API so there is a #define in config.h so that Cogl won't try to dlopen
the library.

Cogl-pango previously had a #ifdef to detect when the GL backend is
used so that it can sneakily pass GL_QUADS to
cogl_vertex_buffer_draw. This is now changed so that it queries the
CoglContext for the backend. However to get this to work Cogl now
needs to export the _cogl_context_get_default symbol and cogl-pango
needs some extra -I flags to so that it can include
cogl-context-private.h
2011-07-11 12:57:38 +01:00
Robert Bragg
3729bf2769 Make it clearer that the 2.0 API is experimental
This explicitly renames the cogl-2.0 reference manual to
cogl-2.0-experimental and renames the cogl-2.0 pkg-config file to
cogl-2.0-experimental.pc. Hopefully this should avoid
miss-understandings.
2011-06-14 17:09:55 +01:00
Robert Bragg
f23a387359 pango: ensure g-ir-compiler can find Cogl-1.0.gir
This uses INTROSPECTION_COMPILER_ARGS to pass
--includedir=$(top_builddir)/cogl so when building the CoglPango typelib
the compiler can find the required Cogl-1.0.gir file.
2011-05-16 17:33:17 +01:00
Robert Bragg
b316241612 deprecate #include <cogl/cogl-pango.h>
cogl-pango is conceptually a separate library so it doesn't seem
appropriate to bundle the headers with all the other cogl headers. Also
in-tree the headers live in a cogl-pango directory so if we want
examples that can include cogl-pango consistently when built in or out
of tree using the convention #include <cogl-pango/cogl-pango.h> makes
that easy.

This adds a compatibility cogl/cogl-pango.h header that's will redirect
to cogl-pango/cogl-pango.h with a warning, or result in an error if
COGL_ENABLE_EXPERIMENTAL_2_0_API is defined.
2011-05-16 13:28:17 +01:00
Neil Roberts
0bd87220b3 cogl-pango/Makefile.am: Add $(top_builddir) to INCLUDES
Some of the sources need to include <cogl/cogl-defines.h> which is in
the build directory. I think this directory gets added to the include
flags anyway by something so the actual building works but when
building the introspection data out of tree it was not included so it
failed to scan.
2011-05-06 18:37:59 +01:00
Emmanuele Bassi
5c131e61e5 build: Generate CoglPango introspection data 2011-05-06 17:34:57 +01:00
Robert Bragg
8b4ee0964b Remove all the options for building cogl standalone
This removes all the remnants from being able to build Cogl standalone
while it was part of the Clutter repository. Now that Cogl has been
split out then standalone builds are the only option.
2011-05-06 12:36:39 +01:00
Robert Bragg
6f2193545e consistently refer to cogl-pango as "cogl-pango"
This renames the pango directory to cogl-pango and it renames the
installed library to libcogl-pango instead of libcoglpango.
2011-05-06 12:12:08 +01:00