- Jun 26, 2012
-
-
Tomeu Vizoso authored
Otherwise, if a texture is created before all the other FBOs, a new atlas will be created, with a FBO with COGL_OFFSCREEN_DISABLE_DEPTH_AND_STENCIL causing last_offscreen_allocate_flags to be 0. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 7d215678)
-
- Jun 20, 2012
-
-
Tomeu Vizoso authored
-
Tomeu Vizoso authored
-
Tomeu Vizoso authored
-
- Jun 19, 2012
-
-
Tomeu Vizoso authored
-
Tomeu Vizoso authored
-
- Jun 18, 2012
-
-
Neil Roberts authored
test-gles2-context was giving a warning because printf was being used without including stdio.h. This changes it to use g_print and to first check for g_test_verbose(). Reviewed-by: Robert Bragg <robert@linux.intel.com>
-
Neil Roberts authored
The cogl-gles2-gears example will fail to build unless --enable-cogl-gles2 is enabled in the configure script because it depends on libcogl-gles2. This patch makes it only conditionally build the example depending on the BUILD_COGL_GLES2 automake conditional. Reviewed-by: Robert Bragg <robert@linux.intel.com>
-
Robert Bragg authored
This adds a new renderer constraint enum: COGL_RENDERER_CONSTRAINT_SUPPORTS_GLES2_CONTEXT that can be used by applications to ensure the renderer they connect to has support for creating a GLES2 context via cogl_gles2_context_new(). The cogl-gles2-context and cogl-gles2-gears examples and the conformance tests have been updated to use this constraint. Reviewed-by: Neil Roberts <neil@linux.intel.com> Conflicts: cogl/cogl-renderer.c
-
Robert Bragg authored
This adds a conformance test that creates a GLES2 context via the cogl api and verifies clearing an offscreen framebuffer via the gles2 api, and switching back and forth between the Cogl and GLES2 apis. Reviewed-by: Neil Roberts <neil@linux.intel.com> Conflicts: tests/conform/Makefile.am
-
Robert Bragg authored
This adds an example of using libcogl-gles2 as a way to port existing GLES 2.0 based code. This is a port of es2gears in the Mesa demos repo. Reviewed-by: Neil Roberts <neil@linux.intel.com> Conflicts: examples/Makefile.am
-
Robert Bragg authored
This adds a library that can be used instead of libGLESv2.so to provide symbols for the GLES 2.0 api. This can be used for convenience when using the cogl_gles2_context_ api since you don't need to manually go through a CoglGLES2Vtable when calling the gles2 api so it should be easier to port existing gles2 code to integrate with Cogl. Reviewed-by: Neil Roberts <neil@linux.intel.com>
-
- Jun 12, 2012
-
-
Robert Bragg authored
This makes it possible to integrate existing GLES2 code with applications using Cogl as the rendering api. Currently all GLES2 usage is handled with separate GLES2 contexts to ensure that GLES2 api usage doesn't interfere with Cogl's own use of OpenGL[ES]. The api has been designed though so we can provide tighter integration later. The api would allow us to support GLES2 virtualized on top of an OpenGL/GLX driver as well as GLES2 virtualized on the core rendering api of Cogl itself. Virtualizing the GLES2 support on Cogl will allow us to take advantage of Cogl debugging facilities as well as let us optimize the cost of allocating multiple GLES2 contexts and switching between them which can both be very expensive with many drivers. As as a side effect of this patch Cogl can also now be used as a portable window system binding API for GLES2 as an alternative to EGL. Parts of this patch are based on work done by Tomeu Vizoso <tomeu.vizoso@collabora.com> who did the first iteration of adding GLES2 API support to Cogl so that WebGL support could be added to webkit-clutter. This patch adds a very minimal cogl-gles2-context example that shows how to create a gles2 context, clear the screen to a random color and also draw a triangle with the cogl api. Reviewed-by: Neil Roberts <neil@linux.intel.com>
-
- Jun 10, 2012
-
-
- Jun 05, 2012
-
-
Rūdolfs Mazurs authored
-
- May 24, 2012
-
-
Robert Bragg authored
This detects when we are running on any of Mesa's software rasterizer backends and disables use of glBlitFramebuffer and glXCopySubBuffer. Both of these currently result in full-screen copies so there's little point in using these to optimize how much of the screen we present. To help ensure we re-evaluate this workaround periodically we have added a comment marker of "ONGOING BUG" above the workaround and added a note to our RELEASING document that says we should grep for this marker and write a NEWS section about ongoing bug workarounds. https://bugzilla.gnome.org/show_bug.cgi?id=674208 Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 11f2f6eb)
-
Robert Bragg authored
The GPU info api previously told us a driver package name and a driver vendor name, but now we have introduced detection for the gpu architecture too and started to track architecture feature flags that can tell us whether a gpu is a deferred or immediate mode renderer for example or if a software rasterizer is being used. This also adds support for checking more vendor names. We should now detect the following cases: Vendors: Intel, Imagination Technologies, ARM, Qualcomm, Nvidia, ATI Architectures: Sandybridge, SGX, Mali Architecture flags: - vertex tiled - vertex immediate mode - vertex software - fragment deferred - fragment immediate mode - fragment software Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit b3803a0a)
-
Neil Roberts authored
Mesa before version 8.0.2 has a slow read pixels path that gets used with the Intel driver where it converts all of the pixels into a floating point representation and back even if the data is being read into exactly the same format. There is however a faster path using the blitter when reading into a PBO with BGRA format. It works out faster to read into a PBO and then memcpy back out into the application's buffer even though it adds an extra memcpy. This patch adds a workaround in cogl_framebuffer_read_pixels_into_bitmap when it detects this situation. In that case it will create a temporary CoglBitmap using cogl_bitmap_new_with_size, read into it and then memcpy the data back out. The main impetus for this patch is that Gnome Shell has implemented this workaround directly using GL calls but it seems like the kind of thing that would sit better at the Cogl layer. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit cb146dc5)
-
Neil Roberts authored
This adds a CoglGpuInfo struct to the CoglContext which contains some enums describing the GL driver in use. This currently includes the driver package (ie, is it Mesa) the version number of the package and the vendor of the GPU (ie, is it by Intel). There is also a bitmask which will contain the workarounds that we should do for that particular driver configuration. The struct is initialised on context creation by using a series of string comparisons on the strings returned from glGetString. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 2037e0f4)
-
- May 21, 2012
-
-
Neil Roberts authored
When rendering the debug wireframe Cogl generates a child pipeline of the application's pipeline to replace the fragment processing. Previously it was creating a new snippet every time something was drawn. Cogl doesn't attempt to compare the contents of snippets when looking in the program cache for a matching pipeline so this would cause it to generate a new program for every primitive. It then quite quickly ends printing the warning about there being more than 50 programs in the cache. To fix that this patch makes it cache the snippet so that Cogl can successfully recognise that it already has a program generated for the new pipeline. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit c4bb08ee)
-
Neil Roberts authored
Previously the CoglDrawFlags passed to _cogl_framebuffer_draw_indexed_attributes when drawing is redirected to draw a wireframe are overriden to avoid validating the pipeline, flushing the framebuffer state and flushing the journal. This ends up breaking scenes that only contain models drawn from attributes in the application because nothing will flush the matrices. It seems to make more sense to just use whatever draw flags were passed from the original draw command so that it will flush the matrices if the caller was expecting it. One problem with this is that if the wireframe causes the journal to be flushed then it will already have temporarily disabled the wireframe debug flag so the journal will not be drawn with wireframes. To fix this the patch adds a CoglDrawFlag to disable the wireframe and uses that instead of disabling the debug flag. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 283f6733)
-
- May 18, 2012
-
-
Neil Roberts authored
When --disable-debug is passed to the configure script it was actually still defining COGL_ENABLE_DEBUG so very little would end up being disabled. If COGL_ENABLE_DEBUG actually got defined it would also fail to compile because _cogl_debug_instances and COGL_DEBUG_N_LONGS from cogl-debug.h were only defined if debugging is enabled but they are used regardless. This patch also makes it so that the _COGL_RETURN_IF_FAIL family of macros that are used when glib support is disabled are now disabled if debugging is disabled. When the glib macros are used they are already disabled because we additionally define G_DISABLE_CHECKS. 'COGL_HANDLE_DEBUG' has been removed from the list of defines passed when debugging is enabled because CoglHandle has already been removed and it is not used anywhere in the code. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 9811a010)
-
- May 13, 2012
-
-
Hajime Taira authored
-
- May 06, 2012
-
-
Gil Forcada authored
-
- May 04, 2012
-
-
Marek Černocký authored
-
- May 02, 2012
-
-
Neil Roberts authored
The function to convert the CoglBufferUpdateHint to a GL enum was previously ifdef'd to only use GL_STREAM_DRAW when Cogl is compiled with big GL support. One problem with this is that it would end up trying to use it on GLES1 if support for both is compiled. The other problem is that GLES2 seems to actually support GL_STREAM_DRAW so we might as well use it in that case. This patch also changes it so that if the hint is stream with GLES1 then it will default to GL_DYNAMIC_DRAW instead of GL_STATIC_DRAW because I think that is closer to the meaning of the stream hint. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 9e997476)
-
- Apr 30, 2012
-
-
- Apr 19, 2012
-
-
Neil Roberts authored
-
Neil Roberts authored
-
Neil Roberts authored
-
- Apr 18, 2012
-
-
Neil Roberts authored
The code for loading a CoglBitmap from a file was missed when upgrading to the new cogl_bitmap_new_for_data function in commit d18b59d9 so it wouldn't compile. This changes it to use _cogl_bitmap_new_with_malloc_buffer to allocate the buffer. https://bugzilla.gnome.org/show_bug.cgi?id=672533 Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 5b785dd4)
-
- Apr 16, 2012
-
-
Robert Bragg authored
If a NULL display is passed to cogl_context_new() then it has to implicitly create a CoglRenderer and CoglDisplay and propagate any resulting errors back to the user. Previously the implementation relied on passing a NULL renderer to cogl_display_new() as the means for implicitly connecting to a renderer. The problem with this though is that cogl_display_new() isn't designed to ever return NULL but if it failed to connect to a renderer automatically it would do and then cogl_context_new would pass NULL to cogl_display_setup() leading to a crash. This patch changes the implementation of cogl_context_new() to now explicitly create a CoglRenderer and connect to it if a NULL display is given. This way we can easily propagate any errors. In addition cogl_display_new has been changed to abort if it fails to implicitly connect to a renderer due to a NULL renderer argument. An application needing to gracefully handle problems connecting to a renderer at runtime should manually instantiate and connect a renderer passing a GError argument to cogl_renderer_connect. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit cc4c5788)
-
Robert Bragg authored
If we fail to allocate the onscreen framebuffer when first requesting 4x msaa then we now print the GError message. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 995f4cd0)
-
Robert Bragg authored
Instead of using cogl_rectangle() this example now uses cogl_framebuffer_draw_rectangle(). This fixes a crash due to the example not pushing a current framebuffer before calling cogl_rectangle(). Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 836d5444)
-
Robert Bragg authored
Cogl internally will call g_type_init if necessary so the cogl-crate example doesn't need to do this explicitly. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 0205a96e)
-
Robert Bragg authored
If we fail to load the crate texture then we now print error->message to hopefully give more insight into the failure to the user. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit b61b328f)
-
Chun-wei Fan authored
cogl_framebuffer_draw_multitextured_rectangles is not in the public API list, it is instead _cogl_framebuffer_draw_multitextured_rectangles, which is private.
-
Chun-wei Fan authored
We need to filter out all the *-egl-* sources as well, as the original filter did not filter out the Wayland EGL sources
-
Yinghua Wang authored
-
- Apr 03, 2012
-
-
Neil Roberts authored
The previous code to initialise the depth state on the default pipeline wasn't initialising the magic number. If you later tried to retrieve the depth state using cogl_pipeline_get_depth_state you would end up with an invalid depth state struct and you would just get warnings if you tried to use it for anything. This patch just replaces the initialisation with a call to cogl_depth_state_init because it uses the same values anyway. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit be9d5b34)
-