Commit Graph

2591 Commits

Author SHA1 Message Date
Damien Lespiau
5ef579b593 gitignore: Only ignore the README file at the root of the repository
We should be able to modify/add README files else where in the tree and
see them with git status, eg build/mingw/README.

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit e97a1bb33a10dc4ea8a23a30cd5e78391439c84f)
2013-01-18 17:28:25 +00:00
Damien Lespiau
c9fe28c93b renderer: Remove unused error from CoglRendererError
This type is not documented and is experimental. We don't use
COGL_RENDERER_ERROR_NOT_FOUND and it's pretty vague anyway, just remove
it.

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit ffa78534616547b9bd4cd5c0ade8fdc039a2b977)
2013-01-18 17:28:25 +00:00
Damien Lespiau
ab91bdf12b build: Remove spurious Makefile.am
These days cogl/ has a non-recursive Makefile.am and an old one was
still present in cogl/driver.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit e1db8e38be72f5372e9d7571a3faec5039e0e6d0)
2013-01-18 17:28:25 +00:00
Damien Lespiau
f4bb93df7f gitignore: Ignore the new and generated cogl-egl-defines.h
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit cf9498b186edf6179c678e92faddcacff11f88f2)
2013-01-18 17:28:25 +00:00
Robert Bragg
1161870670 matrix: Add cogl_debug_matrix_print api
As a convenience for debugging this adds a cogl_debug_matrix_print
function that prints out the components of a matrix and any internal
flags associated with the given matrix.

(cherry picked from commit 3b33889ff1204f19347a9548320ba95baa54c18c)
2013-01-18 17:28:25 +00:00
Robert Bragg
0ffad6ba20 texture-rectangle: Make new_from_foreign api public
This adds a new public cogl_texture_rectangle_new_from_foreign()
function so that we can look at removing the generic
cogl_texture_new_from_foreign().

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit af02792b336bb492c5bd11afc34a5dcd417503f6)
2013-01-18 17:28:19 +00:00
Robert Bragg
13f228fe69 Remove all remaining _EXP suffix defines
To delimit which symbols were considered experimental we used to use
some preprocessor defines to gives experimental symbols an _EXP suffix
so that anyone monitoring the ABI for changes would easily be able to
discount changes made to clearly experimental functions.

These days we simply rely on the gtk-doc "Stability: unstable"
annotation to serve this purpose because changing the actual symbol name
made it slightly more awkward to debug Cogl using GDB and was an extra
mechanical step we decided we could do without.

This patch removes the last remaining _EXP suffix defines in Cogl

(cherry picked from commit 5a1c4a979e00accd492097cfb8f6a8d0fd8331bc)
2013-01-18 10:53:29 +00:00
Robert Bragg
ce5d06afe1 framebuffer: split GL code out from cogl-framebuffer.c
This splits out most of the OpenGL specific code from cogl-framebuffer.c
into cogl-framebuffer-gl.c and extends the CoglDriverVtable interface
for cogl-framebuffer.c to use.

There are hopes to support several different backends for Cogl
eventually to hopefully get us closer to the metal so this makes some
progress in organizing which parts of Cogl are OpenGL specific so these
parts can potentially be switched out later.

The only remaining use of OpenGL still in cogl-framebuffer.c is to
handle cogl_framebuffer_read_pixels.
2013-01-18 10:53:29 +00:00
Damien Lespiau
87bc616d34 framebuffer: Support texture based depth buffers
This commit introduces some new framebuffer api to be able to
enable texture based depth buffers for a framebuffer (currently
only supported for offscreen framebuffers) and once allocated
to be able to retrieve the depth buffer as a texture for further
usage, say, to implement shadow mapping.

The API works as follow:
  * Before the framebuffer is allocated, you can request that a depth
    texture is created with
    cogl_framebuffer_set_depth_texture_enabled()
  * cogl_framebuffer_get_depth_texture() can then be used to grab a
    CoglTexture once the framebuffer has been allocated.
2013-01-18 10:53:29 +00:00
Robert Bragg
58bbf8499a Bump version to 1.13.1 2013-01-18 10:53:29 +00:00
Tomeu Vizoso
5bce5f88d9 Use the correct type for GLintptr
On 32bit, intptr_t has a different type than khronos_intptr_t.

https://bugzilla.gnome.org/show_bug.cgi?id=691296
(cherry picked from commit a77222385812a696a999a871cde439f50b648f69)
2013-01-08 14:56:25 +01:00
Neil Roberts
f1baa4d60f Clear the scissor before calling glBlitFramebuffer in swap_region
glBlitFramebuffer is affected by the scissor so we need to ensure
there is an empty clip flushed before using it. This is similar to
what is done in _cogl_blit_framebuffer().

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

Reviewed-by: Robert Bragg <robert@linux.intel.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>

(cherry picked from commit 65da3f88af9c7b8d72758d116c2652aff68195c1)
2013-01-07 16:37:29 +00:00
Robert Bragg
015a47b77a Post-release version bump to 1.12.3 2013-01-04 17:37:21 +00:00
Robert Bragg
0f2ce5e77c Release 1.12.2 (release) 2013-01-04 17:23:45 +00:00
Robert Bragg
3cc3c19e85 Updates NEWS for the 1.12.2 release 2013-01-04 17:23:45 +00:00
Robert Bragg
ab00855967 build: only build cogland with wayland-server 0.85
This ensures we only try to build cogland if we have wayland-server
0.85.x since the api is incompatible with later versions.
2013-01-04 17:23:45 +00:00
Damien Lespiau
70f71e2627 doc: Generate a valid cogl-context.xml
The automagic paragraph support of gtk-doc is way too simple to support
things like multi-paragraphs <note>s. Let's trick gtk-doc and make it
generate a valid docbook snippet for cogl-context.

Without this, cogl-context remains absent of the reference
documentation, how sad is this?!

(cherry picked from commit 606b472d91450e3221da6631020f534892e866a9)
2013-01-04 17:02:02 +00:00
Chun-wei Fan
9cc076b14c Update Visual C++ property sheets
Remove unneeded items.
2012-12-24 12:23:27 +08:00
Chun-wei Fan
12010882e6 Fix Visual C++ 2008 "install" process
Like the Visual Studio 2010 builds, the install project needs to be split
into two, one for the WGL-only configs and another for the WGL+SDL
configs, so that the Cogl and Cogl-Pango DLLs and LIBs can be correctly
copied during the "install" stage, as the resulting DLLs for all configs
land in {Release|Debug}\{Win32|x64}\bin.
2012-12-14 11:08:07 +08:00
Chun-wei Fan
6c438e0df5 Update Visual Studio 2010 solution files
Cosmetic change to the solution files headers so that they will be
consistent across the board
2012-12-13 17:42:01 +08:00
Chun-wei Fan
8106b054a2 build/win32/vs*/cogl_sdl.sln: Fix line endings
The .sln files need to have Windows/DOS line endings to work in the best
way.
2012-12-13 17:40:50 +08:00
Chun-wei Fan
5bec5005d4 build/win32/vs*/cogl_sdl.sln: Temporary commit to fix line endings 2012-12-13 17:39:05 +08:00
Adam Jackson
f326401094 opengl: Fix conditional call of BlendFuncSeparate
Checking whether src_rgb != src_alpha twice is pointless; not checking
whether dst_rgb != dst_alpha is clearly wrong.

Found by Coverity.

Signed-off-by: Adam Jackson <ajax@redhat.com>

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

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit fc292c25db3004543e277d92693ab9cb388d2121)
2012-12-07 15:52:51 +00:00
Chun-wei Fan
491618a74c cogl-gles2-context: Cast func pointers to void* when filling
vtable

(Sorry, I had to re-apply Neil's patch as the original one somehow did
 not apply)

The function prototypes for the GL functions in CoglContext have the
GLAPIENTRY attribute which on Windows makes them use the stdcall
calling convention. The function pointers exposed from cogl-gles2.h
don't have GLAPIENTRY so they end up having a different calling
convention on Windows. When Cogl is compiled there it ends up giving a
lot of warnings because it assigns a pointer to an incompatible
function type.

We probably don't want to make the functions exposed in cogl-gles2.h
use the stdcall calling convention because we control that API so
there is no need to introduce a second calling convention. The GLES2
context support currently isn't going to work on Windows anyway
because there is no EGL or GLES2 implementation.

Eventually if we make the Cogl GLES2 context virtualized on top of
Cogl then we will provide our own implementations of all these
functions so we can easily keep the C calling convention even on
Windows.

Until then to avoid the warnings on Windows we can just cast the
function pointers temporarily to (void*) when filling in the vtable.

This will also fix the build on Windows using Visual Studio, as it is
more picky on calling convention mismatches.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-11-24 00:18:29 +08:00
Chun-wei Fan
fefa6bc929 cogl.symbols: Add symbols required for Clutter 1.12
Those symbols were missed and are needed for Clutter-1.12.x to build.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2012-11-24 00:01:40 +08:00
Neil Roberts
6a62e3077b sdl: Don't set SDL_GL_DOUBLEBUFFER when the swap chain has no pref
The ‘length’ for the swap chain is initially -1 which is supposed to
mean ‘no preference’. However, both of the SDL winsys's were
explicitly setting the SDL_GL_DOUBLEBUFFER attribute to zero in that
case which would try to disable double buffering.

On OS X, the equivalent to eglSwapBuffers (ie, [NSOpenGLContext
flushBuffer]) does nothing for a single buffer context. The
cogl-sdl-hello example does not specify the swap chain length so
presumably it would end up with a single buffer config. When
cogl_onscreen_swap_buffers is called it therefore does nothing and
nothing is painted.

I guess to make single-buffered contexts actually useful we should
expose some public equivalent to glFlush so that you can ensure the
rendering commands will actually hit the buffer. Alternatively we
could document that cogl_onscreen_swap_buffers performs this task on
single-buffered configs and then we could make the SDL winsys
explicitly call glFlush in that case.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 71e57f99002d5dee79bbd44b3bc57712b99acb55)
2012-11-23 15:45:26 +00:00
Rob Bradford
0e33654efb wayland: Port to new Wayland protocol
Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit db50c3015c589375029a4c26c58db8295bb17bca)
2012-10-18 17:25:21 +01:00
Unticha Pramgoed
ad05cb37c6 Added Thai translation 2012-10-15 13:06:21 +07:00
Rafael Ferreira
cb274ad727 Updated Brazilian Portuguese Translation 2012-10-02 14:53:41 -03:00
Alexander Shopov
5cec3de8b2 Updated Bulgarian translation 2012-10-02 05:28:29 +03:00
Marek Černocký
d6e37fa714 Updated Czech translation 2012-10-01 20:30:12 +02:00
Neil Roberts
0edb848850 Use the right context when pushing the GLES2 context to an onscreen
Previously when pushing the GLES2 context with an onscreen framebuffer
it would just call bind_onscreen. This actually binds it with Cogl's
context so presumably the context isolation wasn't working properly.
This patch splits out bind_onscreen to have a second function called
bind_onscreen_with_context that explicitly takes the EGL context to
use. Cogl now uses this when pushing the GLES2 context.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 3653c5b10058a3f79900eb2644cb30f4cf1ca47e)
2012-10-01 15:05:22 +01:00
Neil Roberts
5e730568d4 Remove an out of date comment in the GLES2 context code
There was a FIXME comment about making glCopyTex{Sub,}Image2D work
with CoglOffscreen buffers. This has already been fixed so we should
remove the comment.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 750e5668ee64a315c8090dd2223334b1e04bee54)
2012-10-01 15:05:16 +01:00
Neil Roberts
07a50012b9 egl: Only allow GLES2 context creation for the GLES2 driver
Previously, Cogl was advertising the GLES2 context feature whenever
the EGL winsys was used, even if the winsys was used with the GL
driver. This wasn't working because when the GL context is created the
API is set to GL with eglBindAPI and it is never changed back to GLES
when the GLES2 context is created. That meant that the created context
is actually GL not GLES2. Any rendering would then fail because the GL
context does not understand the precision statement.

It could be possible to fix it so that it will set the API correctly
before creating the context. It would then also need to reset the API
and unbind the previous context whenever switching between GLES2 and
GL contexts. If the context isn't unbound first then eglMakeCurrent
will actually try to bind both contexts at the same time and at least
Mesa detects this situation and reports that the two contexts
conflict. Presumably we would also need to do something more clever
when we retrieve the function pointers for the GLES2 context.
Currently we just copy them from the CoglContext but if the context is
using the GL driver then this would mean the functions came from libGL
not libGLESv2.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 624dea207cf76ae9ccd7f57c4ebd15d3bd65bff0)
2012-10-01 15:05:11 +01:00
Milo Casagrande
4a4d8153f8 [l10n] Updated Italian translation. 2012-09-29 18:02:19 +02:00
Neil Roberts
9563799655 Fix the terminator in one of the extension lists
The list of extension names in COGL_EXT_BEGIN should be a zero
separated list of strings which is terminated by an empty string. The
name for the GL_ARB_shader_objects extension was missing the zero
separator so presumably it was relying on the following byte to happen
to be a zero in order not to crash.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit f63381f23fa8b0b17e030561940b8a38efff221f)
2012-09-28 17:15:11 +01:00
Neil Roberts
f9e7f8df94 winsys-glx: Remove the vblank counter feature when indirect rendering
Previously when Cogl detects that the GLX context is indirect it
resets the function pointers for the VBLANK_COUNTER feature to NULL.
However it wasn't removing the VBLANK_COUNTER feature flag. Some other
parts of the winsys check for that feature flag rather than checking
whether the pointer is NULL so it would end up calling an invalid
function pointer and crashing. This just fixes it to also clear the
feature flag.

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

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit e947c713a541086f80a308d22774229f0720196a)
2012-09-28 17:15:11 +01:00
Chun-wei Fan
cfdc1c95eb Clean up Visual C++ projects
Since commit 7253c5ca (Bug 682071-cogl/cogl-sdl.h: MSVC: Link to SDL when
apps are built), on Visual C++ we link to SDL.lib and SDLmain.lib using
a #pragma comment directive in cogl/cogl-sdl.h, so we no longer need
specific project configs for Cogl programs which build against a Cogl built
with SDL.  This removes those unneeded configs.

Also "install" cogl/cogl-sdl.h when Cogl is built with the SDL winsys, as
it is a needed header
2012-09-28 18:45:41 +08:00
Chun-wei Fan
c0e9d9235a Update Visual C++ projects
-Make "install" parts for VS9 and VS10 more consistent with each other
-Create the .def files in the respective intermediate/.obj folders, so that
 it is cleaner duringg the build
-Make up for missed files to "install"
2012-09-28 17:14:28 +08:00
Aurimas Černius
244ee67284 Updated Lithuanian translation 2012-09-27 22:06:21 +03:00
Мирослав Николић
3dd87cbf54 Updated Serbian translation 2012-09-27 05:45:39 +02:00
Ihar Hrachyshka
e2ad3cb86b Updated Belarusian translation. 2012-09-26 15:09:36 +03:00
Rūdolfs Mazurs
248182d3d1 Updated Latvian translation 2012-09-26 12:02:54 +03:00
Tom Tryfonidis
e3373e7cb3 Updated Greek translation 2012-09-26 11:21:43 +03:00
Andika Triwidada
30d3f1a7d3 Update French translation 2012-09-26 08:48:27 +02:00
Andika Triwidada
441e4cf8f6 Updated Indonesian translation 2012-09-26 09:00:39 +07:00
Robert Bragg
a8fa6c7c4d Post-release version bump to 1.12.1 2012-09-24 14:19:41 +01:00
Robert Bragg
fe198cf424 Merge branch 'cogl-1.12-release' into cogl-1.12 2012-09-24 14:08:22 +01:00
Robert Bragg
b1aafcc15f Release 1.12.0 (release) 2012-09-24 13:46:40 +01:00
Robert Bragg
d32bbaf0e0 Updates NEWS for the 1.12.0 release 2012-09-24 13:46:01 +01:00