Commit Graph

62 Commits

Author SHA1 Message Date
Damien Lespiau
f798e6e0c7 egl: Make sure to have egl.h included when testing for eglext.h
AC_CHECK_HEADER(S) for eglext.h need include egl.h as it may not be done
for you.

The patch tries to integrate with the previous work to check if
GLES/egl.h ir EGL/egl.h should be included for egl.h.
2011-07-29 11:50:14 +01:00
Robert Bragg
7860df92d1 Post-release version bump to 1.7.5 2011-07-20 17:28:56 +01:00
Robert Bragg
5cd3675552 Release 1.7.4 (snapshot) 2011-07-20 16:58:46 +01:00
Neil Roberts
9b6c1eb2cc configure: Add configure options to override the GL library name
This adds 3 configure options to override the library name that gets
dlopened for GL, GLES and GLESv2. This could be useful for distro
maintainers who have an unusual name for the libraries (for example,
on OpenBSD the GL library appears to be called libGL.so.4). This could
at least be simpler than having to create a distro patch.

The configure options would be used like this:

./configure --with-gl-libname=libGL.so \
            --with-gles1-libname=libGLESv1.so \
            --with-gles2-libname=libGLESv2.so

https://bugzilla.gnome.org/show_bug.cgi?id=654593
2011-07-19 15:12:10 +01:00
Neil Roberts
03c4b20931 Specify the full filename when g_module_open'ing the GL library
Instead of using g_module_build_path with the short name of the GL
library (eg, "GL") and relying on glib to add the suffix and prefix,
the configure script now directly encodes the full name including the
version number (eg, "libGL.so.1"). This is necessary because distros
don't always install the non-versioned suffix for the library.

The GLES libraries are left without the version suffix because it's
not clear what should be placed here and I can't find any
documentation from Khronos to clarify this. Mesa seems to install a
file called libGLESv2.so.2 but the IMG SDK doesn't install any
versioned library. There is an example of dynamically loading
libGLESv2 in the Chromium source code and that does not use the
version suffix even though it does use the version suffix for GL. This
implies that it's at least fairly normal to load the unversioned name
for GLES.

https://bugzilla.gnome.org/show_bug.cgi?id=654593
2011-07-19 15:12:10 +01:00
Robert Bragg
27c0da6685 configure: Expose COGL_HAS_GLX_SUPPORT publicly
Instead of only exposing COGL_HAS_GLX_SUPPORT internally in config.h we
now expose it though the public cogl-defines.h header.

Signed-off-by: Neil Roberts <neil@linux.intel.com>
2011-07-13 19:06:19 +01:00
Damien Lespiau
36e977403c build: Fix the help string for --enable-profile
--enable-uprof has been renamed to --enable-profile, make sure the help
string is updated accordingly.

Signed-off-by: Robert Bragg <robert@linux.intel.com>
2011-07-12 10:39:20 +01:00
Damien Lespiau
6b66679a7c build: Correctly quote the help message for --enable-profile
It did not show up in ./configure --help because of that.

Signed-off-by: Robert Bragg <robert@linux.intel.com>
2011-07-12 10:39:20 +01:00
Robert Bragg
40970ce915 dist: give 2.0 manual unique DOC_MODULE name
The experimental 2.0 reference manual was setup with  DOC_MODULE name of
"cogl" which conflicted with the 1.x API manual. This meant that when
running make install for both the reference manuals all the html files
would end up bundled together in the same location. The 2.0 API
reference now has a DOC_MODULE name of "cogl-2.0-experimental" the
corresponding -sections.txt and -docs.xml.in files have also been
renamed to match this.

Signed-off-by: Neil Roberts <neil@linux.intel.com>
2011-07-11 15:40:02 +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
Neil Roberts
945a64d44c Post-release version bump to 1.7.3 2011-07-01 17:01:18 +01:00
Neil Roberts
3bc30603a9 Release 1.7.2 (snapshot) 2011-07-01 17:01:13 +01:00
Neil Roberts
b11f6c9e11 README: Fix the required version number replacements
The README file is generated by the configure script so that it can
include the required dependency version numbers. However there was no
corresponding AC_SUBST calls for the versions so the README would be
left with @THESE_MARKERS@.
2011-07-01 16:47:42 +01:00
Emmanuele Bassi
38a728b45a build: Do not define "default" in m4
The "default" m4 conflicts with one of libtool's internal symbols, one
that is used to determine whether the -fPIC argument should be used;
this breaks compilation onf 64bit platforms.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
Signed-off-by: Neil Roberts <neil@linux.intel.com>
2011-06-29 12:13:59 +01:00
Robert Bragg
2f000c3c12 Post-release version bump to 1.7.1 2011-06-14 20:17:57 +01:00
Robert Bragg
5b0661ccd5 Release 1.7.0 (snapshot) 2011-06-14 17:09:56 +01:00
Robert Bragg
ec62acfd6a configure: pass tar-ustar as automake init option
So that our released tarballs can contain filenames longer than 99
characters we tell automake to create tarballs using the ustar format.
This is newer than the default v7 format but still old enough to be
considered widely portable.
2011-06-14 17:09:56 +01:00
Robert Bragg
57d76e315f Fixes for make distcheck 2011-06-14 17:09:55 +01:00
Robert Bragg
800f5e6d6e profile: Adds a --enable-profile option
This adds a --enable-profile option which enables uprof based profiling.
It was also necessary to fixup a CLUTTER_ENABLE_PROFILING #ifdef in
cogl-context.c to renamed COGL_ENABLE_PROFILING instead. By default Cogl
doesn't output uprof reports directly, instead it assumes a higher level
toolkit will output a report. If you want a report from Cogl you can
export COGL_PROFILE_OUTPUT_REPORT=1 before running your app.

The latest version of uprof can be fetched from:
git://github.com/rib/UProf.git
2011-06-14 17:09:55 +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
Neil Roberts
01e1260aa0 configure: Force #undef of 'near' and 'far' on Windows
This adds an extra header that gets included from config.h where we
can add configuration defines. This is used to #undef 'near' and 'far'
when building for Windows so that we don't have to avoid using them as
variable names in the Cogl code.
2011-06-14 12:14:02 +01:00
Robert Bragg
a29a76dbab Adds _cogl_wayland_texture_2d_new_from_buffer API
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.
2011-06-01 20:44:42 +01:00
Robert Bragg
c9f1541de0 egl: check or EGL/eglext.h
While running configure we now check for EGL/eglext.h and if found we
will substitute an inclusion in cogl-defines.h.
2011-06-01 20:44:41 +01:00
Robert Bragg
32e7c93aff configure.ac: move the --enable-cairo check
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.
2011-06-01 20:44:41 +01:00
Robert Bragg
b380fed23d Make stub winsys into a proper winsys backend
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.
2011-06-01 20:44:41 +01:00
Robert Bragg
80e7e0ef49 configure: remove the --enable-quartz option
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.
2011-06-01 20:44:41 +01:00
Emmanuele Bassi
cb321e0e5f build: Don't use bash string substitution in configure.ac
Use the shell-neutral version.

https://bugzilla.gnome.org/show_bug.cgi?id=651256
2011-06-01 16:44:57 +01:00
Emmanuele Bassi
df688ad0c8 build: Fix platform detection for Quartz/OSX
The location of the header files for GL and the linker flags are
different on Mac OS X than other Unices.
2011-05-24 23:08:59 +01:00
Damien Lespiau
8e949ff560 build: Allow to forcefully disable the usage cairo
Provide an option to disable cairo usage in the debugging code even if
we find the pc file.
2011-05-17 15:24:54 +01:00
Damien Lespiau
e157971cd8 debug: Allow to compile a debug Cogl without cairo
For people still wanting the debugging code, but don't have or don't
want to compile cairo for their platform.
2011-05-17 15:24:54 +01:00
Damien Lespiau
f436582114 android: Add support for an EGL/Android winsys
The native window type of the EGL/Android winsys is ANativeWinow*. The
Android NDK gives you a pointer to this ANativeWindow and you just need
to configure that window using the EGLConfig you are choosing when
creating the context.

This means you have to know the ANativeWindow* window before creating
the context. This is solved here by just having a global variable you
can set with cogl_android_set_native_window() before creating the
context. This is a bit ugly though, and it conceptually belongs to the
OnScreen creation to know which ANativeWindow* to use. This would need a
"lazy context creation" mechanism, waiting for the user to create the
OnScreen to initialize the GL context.
2011-05-17 15:24:54 +01:00
Damien Lespiau
dd5a1c888b gles1: Include GLES/egl.h or EGL/egl.h depending on the implementation
Early implementations provided only a GLES/egl.h while Khronos's
implementer guide now states EGL/egl.h is the One. Some implementations
keep a GLES/egl.h wrapper around EGL/egl.h for backward compatibility
while others provide EGL/egl.h only.

Also took the opportunity to factorize a bit this inclusion in
cogl-defines.h.
2011-05-17 15:24:54 +01:00
Damien Lespiau
1d6c6f0dad build: Fix the Win32 platform test for GLES2
The error message has a small typo (copy and paste from the GLES1
detection code) and the check was reversed.
2011-05-17 15:24:54 +01:00
Damien Lespiau
780c6fe05d build: Ensure EGL related variables are defined even when EGL_CHECKED=yes
When checking for EGL earlier in the configure script (ie EGL_CHECKED is
"yes"), we did not execute some EGL code. Let's split that code in two:
  - A first part that has a last change to check for EGL
  - A second one that defines variables and that should always been run
    in an EGL build
2011-05-17 15:24:54 +01:00
Damien Lespiau
3530354d5d build: Fix the GLES headers check
GLES/glext.h and GLES2/gl2ext.h need to include GLES/gl.h and
GLES2/gl2.h respectively to get the GL types.

This used to work as autoconf used to only do a preprocessor pass in
AC_CHECK_HEADER(S), but now it also tries to compile a small test
program and thus the test failed.
2011-05-17 15:24:54 +01:00
Damien Lespiau
0ac8135b87 build: Fix the Win32 platform test for GLES1
We want to bail out if trying to configure Cogl with GLES1 on Windows.
Not the opposite.
2011-05-17 15:24:54 +01:00
Damien Lespiau
a789107860 build: Only allow GLX when finding the x11 pc file
You can refine earlier the ALLOW_GLX variable when enabling OpenGL builds:
No x11.pc? no GLX!
2011-05-12 13:00:34 +01:00
Damien Lespiau
0da07b4e3d build: Fix gtkdocize as it needs to parse the GTK_DOC_CHECK line 2011-05-12 12:59:22 +01:00
Damien Lespiau
dc5d3785f6 build: Allow to compile a git checkout without gtk-doc
Gtk-doc can be hard to install on Windows. This patch enables people wanting to
hack on Cogl itself from a Windows system to do so without the hassle to get
gtk-doc installed first.
2011-05-12 11:45:25 +01:00
Robert Bragg
1127ab61a1 don't add -Wshadow to MAINTAINER_CFLAGS
The semantics of shadowing global variables is well defined and it gets
quite annoying to avoid them completely since there are too many
standard APIs with very poor namespacing.
2011-05-11 16:51:10 +01:00
Neil Roberts
6788c80342 Add a WGL winsys
This adds a full winsys to handle WGL and Win32.
2011-05-10 17:58:41 +01:00
Robert Bragg
e8b83f2880 Adds wayland support to the cogl EGL winsys
Wayland now supports integration via standard eglSurfaces which makes it
possible to share more code with other EGL platforms. (though at some
point cogl-winsys-egl.c really needs to gain a more formal
CoglEGLPlatform abstraction so we can rein back on the amount of #ifdefs
we have.)
2011-05-10 16:36:40 +01:00
Robert Bragg
ef60979258 Adds experimental cogl 2.0 reference
This pulls in the experimental cogl 2.0 reference manual from the
clutter repository since it wasn't included in the filter-branch when we
split cogl out.
2011-05-10 16:36:40 +01:00
Damien Lespiau
8d4a6f4d4c build: Enable building the documentation again
At least the 1.6.0 documentation. The 2.0 one has been missed by the
filter-branch and will be re-added later.
2011-05-06 18:17:57 +01:00
Neil Roberts
3919f3e97e configure.ac: Add the check for the ffs function
When Cogl was sharing Clutter's configure script, it had a check for
the ffs function of libc so that it can provide a fallback if it is
not available. This fallback was missed in the split out so Cogl would
end up always using the fallback.
2011-05-06 17:48:24 +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
102d174a2a Adds an initial README to the repo 2011-05-06 12:33:00 +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
Robert Bragg
fbda52d21b Give cogl-pango it's own pkg-config file
We now install cogl-pango-1.0 and cogl-pango-2.0 pkg-config files that
applications should optionally depend on if they want to use the
cogl_pango API.
2011-05-06 12:12:08 +01:00
Robert Bragg
4211462eb2 Make building cogl-pango optional
When building for platforms that don't use pango for handling text
you may not need the cogl-pango library.
2011-05-06 12:12:03 +01:00