Commit Graph

2295 Commits

Author SHA1 Message Date
Gil Forcada
ace43bb238 [l10n] Updated Catalan translation 2012-03-27 22:13:53 +02:00
Chao-Hsiung Liao
3035886edc Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-03-27 11:51:57 +08:00
Rudolfs Mazurs
f78aed0f57 Updated Latvian translation. 2012-03-25 13:59:52 +03:00
Marek Černocký
364a495a49 Updated Czech translation 2012-03-25 12:35:05 +02:00
Neil Roberts
ae5f8323c1 gles2: Support the GL_EXT_unpack_subimage extension
This extension lets you upload texture data from a subregion of a
buffer by passing GL_UNPACK_ROW_LENGTH, GL_UNPACK_SKIP_PIXELS and
GL_UNPACK_SKIP_ROWS to glPixelStore. When this extension is available
the GLES texture driver will now avoid making a copy of the bitmap
when a subregion is used.

Note that Mesa doesn't currently advertise this extension but I've
made a patch to propose it:

http://lists.freedesktop.org/archives/mesa-dev/2012-March/020191.html
2012-03-23 13:51:08 +00:00
Neil Roberts
21e304b339 gles: Support the GL_EXT_texture_format_BGRA8888 extension
This extension allows an application to upload data in BGRA format. We
can use this to avoid a conversion in Cogl whenever it is given BGRA
data. This is quite useful when uploading data generated by Cairo
because at least on little-endian architectures that ends up as BGRA.

The patch just makes the pixel_format_to_gl implementation return
GL_BGRA_EXT for the data format and internal format whenever
COGL_PIXEL_FORMAT_BGRA_8888{,_PRE} is used.

A small caveat with this patch is that once a texture is created as
GL_BGRA, when later using glTexSubImage2D to update the texture it
must always be given data as GL_BGRA. Currently this just works out
because we store the internal format of a texture as a CoglPixelFormat
and we already swizzle the data if it does not match exactly on GLES.
However if we later switch to using a different enum for internal
formats then we might lose the ability to store the component ordering
so we'll have to think of another way to do this.
2012-03-23 13:51:08 +00:00
Neil Roberts
d6ca75fbec Add a context parameter to all of the texture driver virtuals
All of the texture driver virtual functions now take an explicit
CoglContext parameter as a step towards removing the global context.
2012-03-23 13:51:08 +00:00
Neil Roberts
60812e6a0e Add a vtable for the driver
Cogl already had a vtable for the texture driver. This ended up being
used for some things that are not strictly related to texturing such
as converting between pixel formats and GL enums. Some other functions
that are driver dependent such as updating the features were not
indirected through a vtable but instead switched directly by looking
at the ctx->driver enum value. This patch normalises to the two uses
by adding a separate vtable for driver functions not related to
texturing and moves the pixel format conversion functions to it from
the texture driver vtable. It also adds a context parameter to all of
the functions in the new driver vtable so that they won't have to rely
on the global context.
2012-03-23 13:51:08 +00:00
Gabor Kelemen
ccb6792781 Updated Hungarian translation 2012-03-23 11:56:49 +01:00
Rajesh Ranjan
6a732e89b9 hindi translation by Chandan Kumar 2012-03-23 14:51:16 +05:30
Krishnababu Krothapalli
e0a45eb104 Updated Telugu Translations 2012-03-21 22:03:53 +05:30
Chun-wei Fan
699a0bd74a Update cogl.symbols
...for the following added APIs:

cogl_bitmap_new_for_data
cogl_framebuffer_read_pixels
cogl_framebuffer_draw_multitextured_rectangles
cogl_framebuffer_draw_rectangle
cogl_framebuffer_draw_rectangles
cogl_framebuffer_draw_textured_rectangle
cogl_framebuffer_draw_textured_rectangles

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-21 22:15:34 +08:00
Bruno Brouard
14edc7ad50 Updated French translation 2012-03-20 20:57:46 +01:00
Neil Roberts
c2e8cc699f Post-release version bump to 1.10.1 2012-03-20 17:19:27 +00:00
Neil Roberts
724609f945 Release 1.10.0 (release) 2012-03-20 17:13:16 +00:00
Neil Roberts
6b90c24baa Updates NEWS for the 1.10.0 release 2012-03-20 17:13:16 +00:00
Neil Roberts
a8cc560a42 configure: Fix the pkg-config check for pango
It looks like the then-clause of the AS_IF macro needs to be in square
brackets otherwise the configure script gets generated wrong and you
get this output when you run it:

configure: line 17339: COGL_PANGO_DEP_CFLAGS: command not found
configure: line 17340: C: command not found
configure: line 17341: COGL_PANGO_DEP_LIBS: command not found
configure: line 17342: linker: command not found

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-20 17:13:09 +00:00
甘霖
96044c7d6b Update Simplified Chinese translation. 2012-03-20 15:17:53 +00:00
Robert Bragg
890a75ab06 Create standalone public wayland client/server headers
Because the wayland-client-protocol.h header defines symbols that
collide with the wayland-server-protocol.h header we allow applications
to explicitly ensure that they are only including one at a time by
exposing corresponding <cogl/cogl-wayland-client.h> and
<cogl/cogl-wayland-server.h> headers. This also adds a missing guard to
cogl-texture-2d.h that it isn't included directly.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-03-20 14:26:44 +00:00
Neil Roberts
2d1623313c bitmap-pixbuf: Fix the CoglBitmap wrapper for the STB fallback
The fallback code using stb-image.c was missed out in the upgrade to
cogl_bitmap_new_for_data from commit d18b59d9e6 so it wouldn't
compile.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-20 13:53:50 +00:00
Neil Roberts
7f287dda85 Update .gitignore
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-20 13:23:47 +00:00
Neil Roberts
59cc2b7071 Fix some documentation problems
• The documentation for the framebuffer and texture interfaces had a
  mis-matching open and close <note> tag so DocBook got upset and the
  whole documentation disappeared.

• A lot of symbols from the cogl_framebuffer_* interface were missing
  from the cogl-2.0-experimental-sections.txt file.

• cogl_framebuffer_frustum had the wrong version in its Since tag:

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-20 13:17:07 +00:00
Neil Roberts
f485fa6b21 cogl-primitives: Fix a typo in a function declaration
_cogl_framebuffer_draw_multitextured_rectangles had a typo in the
function name in the declaration so it was generating a lot of
compile warnings.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-20 12:41:58 +00:00
Robert Bragg
3881fd3259 Adds cogl_framebuffer_draw_[*_]rectangle functions
This adds experimental 2.0 api replacements for the cogl_rectangle[_*]
functions that don't depend on having a current pipeline set on the
context via cogl_{set,push}_source() or having a current framebuffer set
on the context via cogl_push_framebuffer(). The aim for 2.0 is to switch
away from having a statefull context that affects drawing to having
framebuffer drawing apis that are explicitly passed a framebuffer and
pipeline.

To test this change several of the conformance tests were updated to use
this api instead of cogl_rectangle and
cogl_rectangle_with_texture_coords. Since it's quite laborious going
through all of the conformance tests the opportunity was taken to make
other clean ups in the conformance tests to replace other uses of
1.x api with experimental 2.0 api so long as that didn't affect what was
being tested.
2012-03-20 12:33:40 +00:00
Chun-wei Fan
596b508653 Fix VS property sheets
Fix the situation where glib-mkenums isn't located correctly when COGL
is not built in a root folder of a drive (ex: COGL is not unpacked in
c:\ or D:\, but in c:\blah or d:\blah)
2012-03-20 15:39:58 +08:00
Neil Roberts
ef9aa07d2e framebuffer: Fix a closing tag in the documentation
This was causing the DocBook for the documentation to be invalid so
all of the framebuffer documentation disappeared.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-19 14:47:50 +00:00
Neil Roberts
5cf2c5762f Add cogl_framebuffer_read_pixels()
This adds a public convenience wrapper around
cogl_framebuffer_read_pixels_into_bitmap which allocates a temporary
CoglBitmap to read into the application's own buffer. This can only be
used for the 99% common case where the rowstride is exactly the
bpp*width and the source is the color buffer.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-19 14:47:49 +00:00
Fran Diéguez
35e083303e Updated Galician translations 2012-03-19 00:05:55 +01:00
Adam Matoušek
feec22114c Updated Czech translation 2012-03-18 23:47:41 +01:00
Yuri Myasoedov
764bd80b4a Added Russian translation 2012-03-18 19:50:25 +04:00
Duarte Loreto
9e0034bdf6 Updated Portuguese translation 2012-03-18 15:41:04 +00:00
Neil Roberts
a5f2f0fe2d journal: Don't push and pop the framebuffer when flushing
In theory none of the journal flushing code should be using anything
that relies on the global framebuffer stack because it should all be
using the new 2.0-style API which explicitly mentions the target
framebuffer. Eventually we want to get rid of the framebuffer stack so
we might as well remove the push and pop now.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-16 17:31:03 +00:00
Neil Roberts
ff48f3b174 journal: Always keep a pointer back to the framebuffer
Previously when adding a quad to the journal it would assume the
journal belongs to the framebuffer at the top of the framebuffer stack
and store a reference to that. We eventually want to get rid of the
framebuffer stack so we should avoid using it here. The journal now
takes a pointer back to the framebuffer in its constructor and it
always retains the pointer. As was done previously, the journal still
does not take a reference on the framebuffer unless it is non-empty so
it does not create a permanent circular reference.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-16 17:26:30 +00:00
Ray Strode
dc00c27249 Drive by leak fix when code spelunking
_cogl_shader_compile_real spews a warning when
shader compilation fails if COGL_GL_DEBUG is
defined.  This warning is never freed.

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

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-03-16 16:41:57 +00:00
Neil Roberts
c8f8dbec7e Fix the 1.0 wrapper for cogl_path_curve_to
The 1.0 wrapper for cogl_path_curve_to was using the wrong value for
y_1 so it wouldn't work.

The patch was written by Dénes Almási.

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

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-03-15 18:57:52 +00:00
Neil Roberts
7513aca394 Don't directly link to libGL from the EGL/KMS platform
The KMS platform accesses all of it's GL symbols via the indirection
through the Cogl context so there is no need to link against it
directly. This helps when trying to use Cogl with GLES where pulling
in Xlib via libGL is potentially a problem.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-15 18:09:13 +00:00
Adel Gadllah
fd31da45e2 winsys-glx: Don't assume that copy_sub_buffer is synchronized
We initially assumed that copy_sub_buffer is synchronized on
which is only the case for a subset of GPUs for example it is not
synchronized on INTEL gen6 and gen7, so we remove this assumption
for now.

We should have a specific driver / GPU whitelist if we want to enable
this.

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

Reviewed-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-03-15 15:48:13 +00:00
Daniel Nylander
161263eb9f Updated Swedish translation 2012-03-15 07:36:16 +01:00
Neil Roberts
f1d65e58b3 buffer: Remove const from cogl_is_buffer (const void *)
None of the other cogl_is_blah functions have a const pointer so this
is just for consistency. It helps if someone is trying to have an
array of type-check function pointers to determine the Cogl object
type because in that case all of the functions would have to have the
same prototype.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-14 13:48:11 +00:00
Neil Roberts
d18b59d9e6 Add a public cogl_bitmap_new_for_data
This creates a CoglBitmap which points into an existing buffer in
system memory. That way it can be used to create a texture or to read
pixel data into. The function replaces the existing internal function
_cogl_bitmap_new_from_data but removes the destroy notify call back.
If the application wants notification of destruction it can just use
the cogl_object_set_user_data function as normal. Internally there is
now a convenience function to create a bitmap for system memory and
automatically free the buffer using that mechanism.

The name of the function is inspired by
cairo_image_surface_create_for_data which has similar semantics.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-14 12:19:56 +00:00
Neil Roberts
f65a895b4f texture: When reading, convert data directly into user's buffer
On GLES, when reading texture data back it may need to allocate a
temporary CoglBitmap if the requested format is not supported by the
driver. Previously it would then copy this temporary buffer back into
the user's buffer by calling _cogl_bitmap_convert which would allocate
a second temporary buffer. It would then copy that data into the
user's buffer. This patch changes it to create a CoglBitmap which
points to the user's data and then convert directly into that buffer
using the new _cogl_bitmap_convert_into_bitmap.

This also fixes a small leak where target_bmp would not get freed if
the target format and the closest supported format do match.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-14 12:19:53 +00:00
Neil Roberts
de5d55ae93 context: Enable new feature testing on COGL_ENABLE_EXPERIMENTAL_API
The 2.0 API for querying features (cogl_has_feature etc) does not
conflict with the old 1.0 API (cogl_features_available) so we might as
well enable it when the experimental API is requested without
requesting the 2.0-only API.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-03-14 12:19:48 +00:00
Ryan Lortie
6f59993e1b Move the fallback define for GL_PACK_INVERT_MESA
The if-undefined fallback declaration for GL_PACK_INVERT_MESA was
originally added in cogl.c along with code to use it (as part of commit
6f79eb8a5a).  Later on, commit
10a38bb14f moved the code that used it to
cogl-framebuffer.c but didn't move the define along with it.  Do that
now.

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

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-03-14 12:14:24 +00:00
Chun-wei Fan
a8f8380644 Update VS property sheets
We no longer have COGL_ENABLE_EXPERIMENTAL_API in cogl.symbols as those
APIs are always built into the COGL DLL, so the
-DCOGL_ENABLE_EXPERIMENTAL_API is not needed anymore in the cogl.def
generation process.
2012-03-13 23:24:17 +08:00
Chun-wei Fan
0d3acfb3ed cogl.symbols: Cleanup
-Removed checks for COGL_ENABLE_EXPERIMENTAL_API since these APIs are
 always built into the shared library
-Re-organised the API listing a bit so that they are in alphabetical order

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-03-13 23:17:21 +08:00
Chun-wei Fan
f608ef5f5c cogl.symbols: Reinstate cogl2_clip_push_from_path
This API was re-added into COGL for the 1.10.x release as of commit
361bd516f.  This will be removed once we branch into the 1.11.x development
cycle.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-03-13 23:17:13 +08:00
Chun-wei Fan
caaef35450 Revert "cogl.symbols: Reinstate cogl2_clip_push_from_path"
This reverts commit 199821d8c3.

I forgot something in the comments.  Sorry.
2012-03-13 23:00:35 +08:00
Chun-wei Fan
199821d8c3 cogl.symbols: Reinstate cogl2_clip_push_from_path
This API was re-added into COGL for the 1.10.x release as of commit
361bd516f.  This will be removed once we branch into the 1.11.x development
cycle.
2012-03-13 22:31:30 +08:00
Chun-wei Fan
b13392dbe2 Update VS property sheets
"Install" the cogl2-compatibility.h header which will only be in 1.10.x
2012-03-13 22:14:47 +08:00
Dave Airlie
d42efa3741 cogl-matrix-stack: fix use after free in matrix stack.
If the matrix was reallocated we would use values from the stack
for the matrix parameters. This fixes that and also uses the
function instead of out of lining the same code.

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

Reviewed-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-03-13 13:40:45 +00:00