mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
0a1db7c4d8
This pulls in code from Mesa to improve our matrix manipulation support. It includes support for calculating the inverse of matrices based on top of a matrix categorizing system that allows optimizing certain matrix types. (the main thing we were after) but also adds some optimisations for rotations. Changes compared to the original code from Mesa: - Coding style is consistent with the rest of Cogl - Instead of allocating matrix->m and matrix->inv using malloc, our public CoglMatrix typedef is large enough to directly contain the matrix, its inverse, a type and a set of flags. - Instead of having a _math_matrix_analyse which updates the type, flags and inverse, we have _math_matrix_update_inverse which essentially does the same thing (internally making use of _math_matrix_update_type_and_flags()) but with additional guards in place to bail out when the inverse matrix is still valid. - When initializing a matrix with the identity matrix we don't immediately initialize the inverse matrix; rather we just set the dirty flag for the inverse (since it's likely the user won't request the inverse of the identity matrix)
171 lines
4.6 KiB
Makefile
171 lines
4.6 KiB
Makefile
include $(top_srcdir)/build/autotools/Makefile.am.silent
|
|
|
|
NULL =
|
|
|
|
SUBDIRS = driver
|
|
|
|
BUILT_SOURCES = cogl.h
|
|
EXTRA_DIST = cogl.h.in cogl.pc.in
|
|
CLEANFILES =
|
|
DISTCLEANFILES =
|
|
|
|
# pkg-config ==================================================================
|
|
pc_files = \
|
|
cogl-$(COGL_DRIVER)-$(CLUTTER_API_VERSION).pc \
|
|
cogl-$(CLUTTER_API_VERSION).pc
|
|
|
|
cogl-$(CLUTTER_API_VERSION).pc: cogl.pc
|
|
$(QUIET_GEN)cp -f $< $(@F)
|
|
|
|
cogl-$(COGL_DRIVER)-$(CLUTTER_API_VERSION).pc: cogl.pc
|
|
$(QUIET_GEN)cp -f $< $(@F)
|
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
pkgconfig_DATA = $(pc_files)
|
|
|
|
CLEANFILES += $(pc_files)
|
|
|
|
INCLUDES = \
|
|
-I$(top_srcdir) \
|
|
-I$(top_srcdir)/clutter/cogl \
|
|
-I$(srcdir)/winsys \
|
|
-I$(srcdir)/driver/$(COGL_DRIVER) \
|
|
-I$(top_builddir)/clutter/cogl \
|
|
$(NULL)
|
|
|
|
# public headers
|
|
cogl_public_h = \
|
|
$(srcdir)/cogl-bitmap.h \
|
|
$(srcdir)/cogl-color.h \
|
|
$(srcdir)/cogl-debug.h \
|
|
$(srcdir)/cogl-fixed.h \
|
|
$(srcdir)/cogl-material.h \
|
|
$(srcdir)/cogl-matrix.h \
|
|
$(srcdir)/cogl-offscreen.h \
|
|
$(srcdir)/cogl-path.h \
|
|
$(srcdir)/cogl-shader.h \
|
|
$(srcdir)/cogl-texture.h \
|
|
$(srcdir)/cogl-types.h \
|
|
$(srcdir)/cogl-vertex-buffer.h \
|
|
$(top_builddir)/clutter/cogl/cogl/cogl.h \
|
|
$(NULL)
|
|
|
|
# windowing system; all sources have to be distributed, but we'll
|
|
# compile just the one we need
|
|
cogl_winsys_sources = \
|
|
$(srcdir)/winsys/cogl-eglnative.c \
|
|
$(srcdir)/winsys/cogl-eglx.c \
|
|
$(srcdir)/winsys/cogl-glx.c \
|
|
$(srcdir)/winsys/cogl-osx.c \
|
|
$(srcdir)/winsys/cogl-sdl.c \
|
|
$(srcdir)/winsys/cogl-win32.c \
|
|
$(NULL)
|
|
|
|
# glib-mkenums rules
|
|
glib_enum_h = cogl-enum-types.h
|
|
glib_enum_c = cogl-enum-types.c
|
|
glib_enum_headers = $(cogl_public_h)
|
|
include $(top_srcdir)/build/autotools/Makefile.am.enums
|
|
|
|
noinst_LTLIBRARIES = libclutter-cogl.la
|
|
libclutter_cogl_la_CPPFLAGS = \
|
|
$(COGL_DEBUG_CFLAGS) \
|
|
$(CLUTTER_DEBUG_CFLAGS) \
|
|
$(MAINTAINER_CFLAGS) \
|
|
-DG_DISABLE_SINGLE_INCLUDES \
|
|
-DG_LOG_DOMAIN=\"Cogl-$(COGL_WINSYS)\" \
|
|
-DCLUTTER_COMPILATION
|
|
|
|
libclutter_cogl_la_CFLAGS = $(CLUTTER_CFLAGS)
|
|
|
|
libclutter_cogl_la_LIBADD = -lm $(CLUTTER_LIBS) \
|
|
$(top_builddir)/clutter/cogl/cogl/driver/$(COGL_DRIVER)/libclutter-cogl-driver.la
|
|
|
|
libclutter_cogl_la_SOURCES = \
|
|
$(srcdir)/winsys/cogl-winsys.h \
|
|
$(srcdir)/winsys/cogl-@COGL_WINSYS@.c \
|
|
$(srcdir)/cogl-handle.h \
|
|
$(srcdir)/cogl-context.h \
|
|
$(srcdir)/cogl-context.c \
|
|
$(srcdir)/cogl-internal.h \
|
|
$(srcdir)/cogl.c \
|
|
$(srcdir)/cogl-util.h \
|
|
$(srcdir)/cogl-util.c \
|
|
$(srcdir)/cogl-bitmap-private.h \
|
|
$(srcdir)/cogl-bitmap.c \
|
|
$(srcdir)/cogl-bitmap-fallback.c \
|
|
$(srcdir)/cogl-primitives.h \
|
|
$(srcdir)/cogl-primitives.c \
|
|
$(srcdir)/cogl-bitmap-pixbuf.c \
|
|
$(srcdir)/cogl-clip-stack.h \
|
|
$(srcdir)/cogl-clip-stack.c \
|
|
$(srcdir)/cogl-fixed.c \
|
|
$(srcdir)/cogl-color.c \
|
|
$(srcdir)/cogl-vertex-buffer-private.h \
|
|
$(srcdir)/cogl-vertex-buffer.c \
|
|
$(srcdir)/cogl-matrix.c \
|
|
$(srcdir)/cogl-matrix-stack.c \
|
|
$(srcdir)/cogl-matrix-stack.h \
|
|
$(srcdir)/cogl-material.c \
|
|
$(srcdir)/cogl-material-private.h \
|
|
$(srcdir)/cogl-blend-string.c \
|
|
$(srcdir)/cogl-blend-string.h \
|
|
$(srcdir)/cogl-debug.c \
|
|
$(srcdir)/cogl-texture-private.h \
|
|
$(srcdir)/cogl-texture-2d-sliced-private.h \
|
|
$(srcdir)/cogl-texture-driver.h \
|
|
$(srcdir)/cogl-texture.c \
|
|
$(srcdir)/cogl-texture-2d-sliced.c \
|
|
$(srcdir)/cogl-spans.h \
|
|
$(srcdir)/cogl-spans.c \
|
|
$(srcdir)/cogl-journal-private.h \
|
|
$(srcdir)/cogl-journal.c \
|
|
$(srcdir)/cogl-draw-buffer-private.h \
|
|
$(srcdir)/cogl-draw-buffer.c \
|
|
$(srcdir)/cogl-matrix-mesa.h \
|
|
$(srcdir)/cogl-matrix-mesa.c \
|
|
$(BUILT_SOURCES) \
|
|
$(NULL)
|
|
|
|
EXTRA_DIST += $(cogl_winsys_sources)
|
|
|
|
EXTRA_DIST += stb_image.c
|
|
|
|
# COGL installed headers
|
|
cogl_headers = \
|
|
$(cogl_public_h) \
|
|
$(srcdir)/cogl-deprecated.h \
|
|
cogl-defines-$(COGL_DRIVER).h \
|
|
cogl-enum-types.h \
|
|
$(NULL)
|
|
|
|
coglincludedir = $(includedir)/clutter-@CLUTTER_API_VERSION@/cogl
|
|
coglinclude_HEADERS = $(cogl_headers)
|
|
|
|
if HAVE_INTROSPECTION
|
|
Cogl-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-cogl.la
|
|
$(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \
|
|
--namespace Cogl --nsversion=@CLUTTER_API_VERSION@ \
|
|
-I$(srcdir) \
|
|
-I$(srcdir)/.. \
|
|
-I$(srcdir)/winsys \
|
|
-I$(srcdir)/driver/@COGL_DRIVER@ \
|
|
-DCLUTTER_COMPILATION \
|
|
--c-include='cogl/cogl.h' \
|
|
--include=GL-1.0 \
|
|
--include=GObject-2.0 \
|
|
--library=libclutter-cogl.la \
|
|
--libtool="$(top_builddir)/libtool" \
|
|
--pkg gobject-2.0 \
|
|
--output $@ \
|
|
$(cogl_headers)
|
|
|
|
BUILT_GIRSOURCES = Cogl-@CLUTTER_API_VERSION@.gir
|
|
|
|
girdir = $(datadir)/gir-1.0
|
|
gir_DATA = $(BUILT_GIRSOURCES)
|
|
|
|
CLEANFILES += $(BUILT_GIRSOURCES)
|
|
endif
|
|
|