summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* Remove the long since deprecated cogl_material apiRobert Bragg2012-04-161-1/+0
| | | | | | | This removes the cogl_material api which has long since been replaced by the cogl_pipeline api. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Remove deprecated cogl_vertex_buffer apiRobert Bragg2012-04-161-2/+0
| | | | | | | | | The cogl_vertex_buffer has long since been deprecated by the cogl_attribute and cogl_primitive apis. The cogl_vertex_buffer api tried to be too clever but took away important control from the developer and was very cumbersome to use. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Removed legacy cogl-fixed 1.x apiRobert Bragg2012-04-161-1/+0
| | | | | | | We haven't really used the cogl fixed point api for a very long time so for now we are simply going to remove it for 2.0. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Start building parallel installable 2.0 api onlyRobert Bragg2012-04-1619-1207/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Since we are getting towards a complete Cogl 2.0 api this breaks 1.x api compatibility by no longer building a libcogl.so and instead building a libcogl2.so library. The headers are now installed into an include/cogl2 sub-directory that wont conflict with an installed cogl 1.x package. The cogl-2.0-experimental.pc pkg-config file is now named cogl2.pc and similarly the reference manual has been renamed from cogl-2.0-experimental to cogl2. The examples have not been namespaced and so they are not parallel installable. Since we haven't yet reached the 2.0 api yet the version has been bumped to 1.99.1 All of the conformance tests have been updated so they no longer test the 1.x apis, and since I was going through all the tests I took the opportunity to rename the global ctx and fb variables to test_ctx and test_fb. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Rework sdl integration apiRobert Bragg2012-04-122-0/+12
| | | | | | | | | This re-works the SDL integration api to simplify the integration for application developers and also allow Cogl to know when the application is about to go idle waiting for events so it can perform idle book-keeping work. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Add constructors which take a CoglBitmap to all primitive texturesNeil Roberts2012-04-051-0/+3
| | | | | | | | | | | | | | | | | | | This adds public constructors which take a CoglBitmap to all primitive texture types. This constructor should be considered the canonical constructor for initializing the texture with data because it should be possible to wrap any type of data in a CoglBitmap. Having at least this single constructor avoids the need to have an explosion of constructors such as new_from_data, new_from_pixel_buffer and new_from_file etc. The already available internal bitmap constructor for CoglTexture2D has had its flags parameter removed under the assumption that flags do not make sense for primitive textures. The meta constructor cogl_texture_new_from_bitmap now just explicitly calls set_auto_mipmap after constructing the texture depending on the value of the COGL_TEXTURE_NO_AUTO_MIPMAP flag. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Add a CoglPrimitiveTexture interfaceNeil Roberts2012-04-042-3/+16
| | | | | | | | | | | | | | | | | | | | | This interface represents any textures that are backed by a single texture in GL and that can be used directly with the cogl_framebuffer_draw_attributes family of functions. This currently equates to CoglTexture2D, CoglTexture3D and CoglTextureRectangle. The interface currently has only one method called cogl_primitive_set_auto_mipmap. This replaces the COGL_TEXTURE_NO_AUTO_MIPMAP flag from the CoglTextureFlags parameter in the constructors. None of the other flags in CoglTextureFlags make sense for primitive textures so it doesn't seem like a good idea to need them for primitive constructors. There is a boolean in the vtable to mark whether a texture type is primitive which the new cogl_is_primitive function uses. There is also a new texture virtual called set_auto_mipmap which is only required to be implemented for primitive textures. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Fix some documentation problemsNeil Roberts2012-03-201-0/+31
| | | | | | | | | | | | | • 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>
* Adds cogl_framebuffer_draw_[*_]rectangle functionsRobert Bragg2012-03-201-0/+5
| | | | | | | | | | | | | | | | | | 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.
* Add cogl_framebuffer_read_pixels()Neil Roberts2012-03-191-0/+1
| | | | | | | | | | 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>
* Add -Wmissing-declarations to maintainer flags and fix problemsNeil Roberts2012-03-061-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option to GCC makes it give a warning whenever a global function is defined without a declaration. This should catch cases were we've defined a function but forgot to put it in a header. In that case it is either only used within one file so we should make it static or we should declare it in a header. The following changes where made to fix problems: • Some functions were made static • cogl-path.h (the one containing the 1.0 API) was split into two files, one defining the functions and one defining the enums so that cogl-path.c can include the enum and function declarations from the 2.0 API as well as the function declarations from the 1.0 API. • cogl2-clip-state has been removed. This only had one experimental function called cogl_clip_push_from_path but as this is unstable we might as well remove it favour of the equivalent cogl_framebuffer_* API. • The GLX, SDL and WGL winsys's now have a private header to define their get_vtable function instead of directly declaring in the C file where it is called. • All places that were calling COGL_OBJECT_DEFINE need to have the cogl_is_whatever function declared so these have been added either as a public function or in a private header. • Some files that were not including the header containing their function declarations have been fixed to do so. • Any unused error quark functions have been removed. If we later want them we should add them back one by one and add a declaration for them in a header. • _cogl_is_framebuffer has been renamed to cogl_is_framebuffer and made a public function with a declaration in cogl-framebuffer.h • Similarly for CoglOnscreen. • cogl_vdraw_indexed_attributes is called cogl_framebuffer_vdraw_indexed_attributes in the header. The definition has been changed to match the header. • cogl_index_buffer_allocate has been removed. This had no declaration and I'm not sure what it's supposed to do. • CoglJournal has been changed to use the internal CoglObject macro so that it won't define an exported cogl_is_journal symbol. • The _cogl_blah_pointer_from_handle functions have been removed. CoglHandle isn't used much anymore anyway and in the few places where it is used I think it's safe to just use the implicit cast from void* to the right type. • The test-utils.h header for the conformance tests explicitly disables the -Wmissing-declaration option using a pragma because all of the tests declare their main function without a header. Any mistakes relating to missing declarations aren't really important for the tests. • cogl_quaternion_init_from_quaternion and init_from_matrix have been given declarations in cogl-quaternion.h Reviewed-by: Robert Bragg <robert@linux.intel.com>
* docs: Make sure we check wayland support for releasesRobert Bragg2012-03-051-1/+1
| | | | | This updates the RELEASING notes to state that we should enable wayland support when preparing and testing for a release.
* docs: remove redundancies from doc/RELEASINGRobert Bragg2012-03-051-16/+0
| | | | | | This removes the notes about explicitly testing a release on GLES2 and with the different pipeline backends since the test suite now does this for us.
* Change API so that CoglPixelBuffer no longer knows its w/h/formatNeil Roberts2012-03-052-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is that CoglPixelBuffer should just be a buffer that can be used for pixel data and it has no idea about the details of any images that are stored in it. This is analogous to CoglAttributeBuffer which itself does not have any information about the attributes. When you want to use a pixel buffer you should create a CoglBitmap which points to a region of the attribute buffer and provides the extra needed information such as the width, height and format. That way it is also possible to use a single CoglPixelBuffer with multiple bitmaps. The changes that are made are: • cogl_pixel_buffer_new_with_size has been removed and in its place is cogl_bitmap_new_with_size. This will create a pixel buffer at the right size and rowstride for the given width/height/format and immediately create a single CoglBitmap to point into it. The old function had an out-parameter for the stride of the image but with the new API this should be queriable from the bitmap (although there is no function for this yet). • There is now a public cogl_pixel_buffer_new constructor. This takes a size in bytes and data pointer similarly to cogl_attribute_buffer_new. • cogl_texture_new_from_buffer has been removed. If you want to create a texture from a pixel buffer you should wrap it up in a bitmap first. There is already API to create a texture from a bitmap. This patch also does a bit of header juggling because cogl-context.h was including cogl-texture.h and cogl-framebuffer.h which were causing some circular dependencies when cogl-bitmap.h includes cogl-context.h. These weren't actually needed in cogl-context.h itself but a few other headers were relying on them being included so this adds the #includes where necessary. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Add a public cogl_framebuffer_read_pixels_into_bitmapNeil Roberts2012-03-051-0/+1
| | | | | | | | | | | | | | This adds a public function to read pixels from a framebuffer into a CoglBitmap. This replaces the internal function _cogl_read_pixels_with_rowstride because a CoglBitmap contains a rowstride so it can be used for the same purpose. A CoglBitmap already has public API to make one that points to a CoglPixelBuffer so this function can be used to read pixels into a PBO. It also avoids the need to push the framebuffer on to the context's stack so it provides a function which can be used in the 2.0 API after the stack is removed. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* doc/RELEASING: Add a note to test with all pipeline backends and GLES2Neil Roberts2012-02-211-0/+16
| | | | | | | This adds a test step to test all of the pipeline backends and GLES2. GLES2 is currently known to fail for a few tests so it is recommended to test it with a for loop and make a note of the list of failed tests.
* Removes the COGL_PIXEL_FORMAT_{24,32} definesRobert Bragg2012-02-202-4/+0
| | | | | | | | | | | | | | | | | | | Although these are in the public headers we should assume that no one is using them since they were never documented so no could know what they are useful for. If you were to guess you'd be forgiven for thinking they were bitmasks for checking some flags to see if a format is 24 or 32 bits. If you looked further you might instead be forgiven for thinking that if you masked of the least significant nibble of a pixel-format then you could check the value against these defines. Neither of the previous operations are reliable ways to check if a format is 24 or 32bit and instead code must use then internal _cogl_pixel_format_get_bytes_per_pixel() api if they want to know the pixel size for a given format which relies on a 16 entry lookup table using the least significant nibble of a pixel-format. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Remove COGL_UNORDERED_MASK defineRobert Bragg2012-02-202-2/+0
| | | | | | | | | | | | | | | Although it's in a public header nothing should be using this define since it's not documented what it could be used for. The cases where we were using it internally were quite fragile because they were trying to mask information from the least significant nibble of CoglPixelFormat but really that nibble just has to be dealt with using lookup tables. The least significant nibble of a pixel format gives information about the bytes per pixel and whether the components are byte aligned but the information needs to be accessed using _cogl_pixel_format_get_byes_per_pixel() and _cogl_pixel_format_is_endian_dependant(). Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Remove COGL_UNPREMULT_MASK defineRobert Bragg2012-02-202-2/+0
| | | | | | | | | | Since (A & ~COGL_PREMULT_BIT) is basically as readable as (A & COGL_UNPREMULT_MASK) this patch removes the mask define. Without the mask the code is slightly more explicit and there's less risk in error caused by us forgetting to update the COGL_UNPREMULT_MASK if the way CoglPixelFormat is defined evolves. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Move all types/prototypes from cogl.h -> cogl[1]-context.hRobert Bragg2012-02-201-1/+0
| | | | | | | | | | | | So we can get to the point where cogl.h is merely an aggregation of header includes for the 1.x api this moves all the function prototypes and type definitions into a cogl-context.h and a new cogl1-context.h. Ideally no code internally should ever need to include cogl.h as it just represents the public facing header for accessing the 1.x api which should only be used by Clutter. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Add cogl_pipeline_set_layer_null_texture()Neil Roberts2012-02-131-0/+1
| | | | | | | | | | | | | | This adds a public function to replace the texture for a layer with the default white texture. It is equivalent to calling cogl_pipeline_set_layer_texture with NULL for the texture object except that it also lets you choose a type for the texture. The idea is that applications using a base pipeline to make multiple copies that can share the generated shaders can use this function to make the layer come into existence with the right texture type. Previously the idiom would be to create a 1x1 dummy texture of the right type but this ends up creating lots of redundant little textures. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Add _cogl_texture_get_type()Neil Roberts2012-02-131-0/+1
| | | | | | | | | | | | | | | | This adds an internal function to get the type of the underlying hardware texture for any CoglTexture. It can return one of three values to represent 2D textures, 3D textures or rectangle textures. The idea is that this can be used as a replacement for cogl_texture_get_gl_texture when only the target is required to make it a bit less GL-centric. The implementation adds a new virtual function which all of the texture backends now implement. The enum is in a public header because a later patch will want to use it from the CoglPipeline API. We may want to consider making the function public too later. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* framebuffer: Add cogl_framebuffer draw methodsRobert Bragg2012-02-092-15/+7
| | | | | | | | | | | | | | | | | | | | | This adds cogl_framebuffer_ apis for drawing attributes and primitives that replace corresponding apis that depend on the default CoglContext. This is part of the on going effort to adapt the Cogl api so it no longer depends on a global context variable. All the new drawing functions also take an explicit pipeline argument since we are also aiming to avoid being a stateful api like Cairo and OpenGL. Being stateless makes it easier for orthogonal components to share access to the GPU. Being stateless should also minimize any impedance miss-match for those wanting to build higher level stateless apis on top of Cogl. Note: none of the legacy, global state options such as cogl_set_depth_test_enabled(), cogl_set_backface_culling_enabled() or cogl_program_use() are supported by these new drawing apis and if set will simply be silently ignored. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Add cogl_primitive_get_indices()Neil Roberts2012-02-071-0/+1
| | | | | | This adds a public getter for the indices property of CoglPrimitive. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Add cogl_primitive_foreach_attribute()Neil Roberts2012-02-071-0/+2
| | | | | | | | | This adds a public function to iterate the attributes of a CoglPrimitive. Previously there was no way to query back the attributes but there was methods to query back all of the other properties. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Add cogl_primitive_copy()Neil Roberts2012-02-071-0/+1
| | | | | | | | | This adds a public function to make a copy of a primitive. The copy is shallow which means it will share the same attributes and attribute buffers. This could be useful for code that wants to have multiple similar primitives with slightly modified properties. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* docs: Updates cogl_primitive_new_xyz symbols listingRobert Bragg2012-01-161-8/+9
| | | | | | | | | Previously we had functions named like cogl_primitive_new_with_xyz_attributes() but at some point we renamed them all to functions named like cogl_primitive_new_xyz() instead. This updates the -sections.txt symbol listing to list the new names. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* docs: Add list of api introduced in 1.8 versionJavier Jardón2012-01-131-0/+5
|
* Add a utility to make a GSource out of a CoglContextNeil Roberts2012-01-051-0/+1
| | | | | | | | | | | | | The GSource is created using cogl_glib_source_new which takes a pointer to a CoglContext. The source calls cogl_poll_get_info() in its prepare function and cogl_poll_dispatch() in its dispatch function. The poll FDs on the source are updated according to what Cogl reports. The header is only included and the source only compiled if Cogl is configured with GLib support. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Add support for main loop integrationNeil Roberts2012-01-052-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds two new functions: void cogl_poll_get_info (CoglContext *context, CoglPollFD **poll_fds, int *n_poll_fds, gint64 *timeout); void cogl_poll_dispatch (CoglContext *context, const CoglPollFD *poll_fds, int n_poll_fds); The application is expected to call the first function whenever it is about to block to go idle, and the second function whenever it comes out of idle. This gives Cogl winsys's the ability poll file descriptors for events. For example when handing swap complete notifications, it can report that it needs to block on a file descriptor. The two functions are backed by winsys virtual functions. There are currently no implementations. The default handler for get_info just reports no file descriptors and an infinite timeout. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Add the missing cogl_is_context() functionNeil Roberts2012-01-051-0/+1
| | | | | | This was missing from the CoglContext header. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* snippet: Add some more documentationNeil Roberts2011-12-073-0/+23
| | | | | | | | | This adds a documentation section for CoglSnippet which gives an overview of how to use them. It also fixes some syntax errors in the existing documentation and adds the missing pipeline functions for adding snippets to the documentation sections file. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* attribute: Add the buffer and normalized property APIs to the headerNeil Roberts2011-12-061-0/+4
| | | | | | | The header was missing declarations for cogl_attribute_{get,set}_{buffer,normalized}. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* matrix: Add cogl_matrix_orthographicRobert Bragg2011-12-061-1/+1
| | | | | | | | | | This adds an experimental cogl_matrix_orthographic() function that is more consistent with other Cogl api by taking x_1, y_1, x_2, y_2 arguments to define the top-left and bottom-right coordinates of the orthographic coordinates instead of OpenGL style left, right, bottom and top values. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* reference: don't look for $(top_srcdir)/cogl/winsys/*.hRobert Bragg2011-11-221-2/+1
| | | | | There are no headers built under the winsys directory so avoid looking for them since that breaks dist rules.
* cogl-pipeline: Add support for setting uniform valuesNeil Roberts2011-11-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the following new public experimental functions to set uniform values on a CoglPipeline: void cogl_pipeline_set_uniform_1f (CoglPipeline *pipeline, int uniform_location, float value); void cogl_pipeline_set_uniform_1i (CoglPipeline *pipeline, int uniform_location, int value); void cogl_pipeline_set_uniform_float (CoglPipeline *pipeline, int uniform_location, int n_components, int count, const float *value); void cogl_pipeline_set_uniform_int (CoglPipeline *pipeline, int uniform_location, int n_components, int count, const int *value); void cogl_pipeline_set_uniform_matrix (CoglPipeline *pipeline, int uniform_location, int dimensions, int count, gboolean transpose, const float *value); These are similar to the old functions used to set uniforms on a CoglProgram. To get a value to pass in as the uniform_location there is also: int cogl_pipeline_get_uniform_location (CoglPipeline *pipeline, const char *uniform_name); Conceptually the uniform locations are tied to the pipeline so that whenever setting a value for a new pipeline the application is expected to call this function. However in practice the uniform locations are global to the CoglContext. The names are stored in a linked list where the position in the list is the uniform location. The global indices are used so that each pipeline can store a mask of which uniforms it overrides. That way it is quicker to detect which uniforms are different from the last pipeline that used the same CoglProgramState so it can avoid flushing uniforms that haven't changed. Currently the values are not actually compared which means that it will only avoid flushing a uniform if there is a common ancestor that sets the value (or if the same pipeline is being flushed again - in which case the pipeline and its common ancestor are the same thing). The uniform values are stored in the big state of the pipeline as a sparse linked list. A bitmask stores which values have been overridden and only overridden values are stored in the linked list. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* cogl-matrix: Add a public cogl_matrix_transpose()Neil Roberts2011-11-162-0/+2
| | | | | | | This function takes a single matrix argument and replaces the matrix with its transpose. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* pipeline: Make the backface culling experimental publicNeil Roberts2011-11-141-0/+5
| | | | | | | | | | | | | | | | | | | This adds two new experimental public functions to replace the old internal _cogl_pipeline_set_cull_face_state function: void cogl_pipeline_set_cull_face_mode (CoglPipeline *pipeline, CoglPipelineCullFaceMode cull_face_mode); void cogl_pipeline_set_front_face_winding (CoglPipeline *pipeline, CoglWinding front_winding); There are also the corresponding getters. https://bugzilla.gnome.org/show_bug.cgi?id=663628 Reviewed-by: Robert Bragg <robert@linux.intel.com>
* docs: Adds various missing 2.0 sections and symbolsRobert Bragg2011-11-013-14/+46
| | | | | This adds a number of missing sections and symbols to the experimental 2.0 reference manual.
* texture: Make CoglSubTexture experimental public apiRobert Bragg2011-11-011-0/+7
| | | | | | | | | | | | This exposes cogl_sub_texture_new() and cogl_is_sub_texture() as experimental public API. Previously sub-textures were only exposed via cogl_texture_new_from_sub_texture() so there wasn't a corresponding CoglSubTexture type. A CoglSubTexture is a high-level texture defined as a sub-region of some other parent texture. CoglSubTextures are high level textures that implement the CoglMetaTexture interface which can be used to manually handle texture repeating. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* framebuffer: adds cogl_framebuffer_get_samples_per_pixelRobert Bragg2011-11-011-0/+2
| | | | | | | | It's useful to be able to query back the number of point_samples_per_pixel that may have previously be chosen using cogl_framebuffer_set_samples_per_pixel(). Reviewed-by: Neil Roberts <neil@linux.intel.com>
* doc: Adds a cogl-texture-2d to the 2.0 reference manualRobert Bragg2011-11-011-0/+9
| | | | | | | When we make CoglTexture2D public as experimental api we forgot to add a corresponding section the experimental 2.0 reference manual. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* texture: Make CoglTextureRectangle experimentally publicRobert Bragg2011-11-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | This exposes CoglTextureRectangle in the experimental cogl 2.0 api. For now we just expose a single constructor; cogl_texture_rectangle_new_with_size() but we can add more later. This is part of going work to improve our texture apis with more emphasis on providing low-level access to the varying semantics of different texture types understood by the gpu instead of only trying to present a lowest common denominator api. CoglTextureRectangle is notably useful for never being restricted to power of two sizes and for being sampled with non-normalized texture coordinates which can be convenient for use a lookup tables in glsl due to not needing separate uniforms for mapping normalized coordinates to texels. Unlike CoglTexture2D though rectangle textures can't have a mipmap and they only support the _CLAMP_TO_EDGE wrap mode. Applications wanting to use CoglTextureRectangle should first check cogl_has_feature (COGL_FEATURE_ID_TEXTURE_RECTANGLE). Reviewed-by: Neil Roberts <neil@linux.intel.com>
* framebuffer: split out CoglOnscreen codeRobert Bragg2011-11-012-0/+2
| | | | | | | | | | This factors out the CoglOnscreen code from cogl-framebuffer.c so we now have cogl-onscreen.c, cogl-onscreen.h and cogl-onscreen-private.h. Notably some of the functions pulled out are currently namespaced as cogl_framebuffer but we know we are planning on renaming them to be in the cogl_onscreen namespace; such as cogl_framebuffer_swap_buffers(). Reviewed-by: Neil Roberts <neil@linux.intel.com>
* features: Support more than 32 features!Robert Bragg2011-11-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Currently features are represented as bits in a 32bit mask so we obviously can't have more than 32 features with that approach. The new approach is to use the COGL_FLAGS_ macros which lets us handle bitmasks without a size limit and we change the public api to accept individual feature enums instead of a mask. This way there is no limit on the number of features we can add to Cogl. Instead of using cogl_features_available() there is a new cogl_has_feature() function and for checking multiple features there is cogl_has_features() which takes a zero terminated vararg list of features. In addition to being able to check for individual features this also adds a way to query all the features currently available via cogl_foreach_feature() which will call a callback for each feature. Since the new functions take an explicit context pointer there is also no longer any ambiguity over when users can first start to query features. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* framebuffer: Adds experimental _finish() APIRobert Bragg2011-11-011-0/+1
| | | | | | | | | | This adds a new experimental function, cogl_framebuffer_finish(), which can be used to explicitly synchronize the CPU with the GPU. It's rare that this level of explicit synchronization is desirable but for example it can be useful during performance analysys to make sure measurements reflect the working time of the GPU not just the time to queue commands. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* doc/RELEASING: Add a note about testing windows compilationNeil Roberts2011-10-171-0/+6
| | | | | | | Now that we have reasonably good Windows support, we'd like to make sure each release still compiles there. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* doc/RELEASING: note that the conformance tests should be runRobert Bragg2011-09-191-1/+5
| | | | | This documents that `make check` should be run as part of the release process.
* pipeline: split out all layer state apisRobert Bragg2011-09-192-0/+2
| | | | | | | | | | | | As part of an on-going effort to get cogl-pipeline.c into a more maintainable state this splits out all the apis relating just to layer state. This just leaves code relating to the core CoglPipeline and CoglPipelineLayer design left in cogl-pipeline.c. This splits out around 2k more lines from cogl-pipeline.c although we are still left with nearly 4k lines so we still have some way to go! Reviewed-by: Neil Roberts <neil@linux.intel.com>
* pipeline: split out all core state apisRobert Bragg2011-09-192-0/+2
| | | | | | | | | | | | | | | | Since cogl-pipeline.c has become very unwieldy this make a start at trying to shape this code back into a manageable state. This patche moves all the API relating to core pipeline state into cogl-pipeline-state.c. This doesn't move code relating to layer state out nor does it move any of the code supporting the core design of CoglPipeline itself. This change alone factors out 2k lines of code from cogl-pipeline.c which is obviously a good start. The next step will be to factor out the layer state and then probably look at breaking all of this state code down into state-groups. Reviewed-by: Neil Roberts <neil@linux.intel.com>