Commit Graph

704 Commits

Author SHA1 Message Date
Neil Roberts
7caa10160d cogl-material: Set the blend equation even if blend funcs are the same
Previously it would only try to set the blend equation if the RGB and
alpha blending functions were different. However it's completely valid
to use a non-standard blending function when the functions are the
same. This patch moves the blending equation to outside the if
statement.
2010-05-17 16:31:28 +01:00
Neil Roberts
dd9e7853ec cogl-material: Set blend constant even if alpha and rgb factors are the same
Previously it would only set the blend constant if glBlendFuncSeparate
was used but it is perfectly acceptable to use the blend constant when
the same factor is used for each. It now sets the blend constant
whenever one of the factors would use the constant.
2010-05-17 16:31:28 +01:00
Neil Roberts
502446ed8d cogl-blend-string: Don't split combined blend statements into two
When a single statement is used to specify the factors for both the
RGB and alpha parts it previously split up the statement into
two. This works but it ends up unnecessarily using glBlendFuncSeparate
when glBlendFunc would suffice.

For example, the blend statement

 RGBA = ADD(SRC_COLOR*(SRC_COLOR), DST_COLOR*(1-SRC_COLOR))

would get split into the two statements

 RGBA = ADD(SRC_COLOR*(SRC_COLOR[RGB]), DST_COLOR*(1-SRC_COLOR[RGB]))
 A    = ADD(SRC_COLOR*(SRC_COLOR[A]), DST_COLOR*(1-SRC_COLOR[A]))

That translates to:

 glBlendFuncSeparate (GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR,
                      GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

This patch makes it so that arg_to_gl_blend_factor can handle the
combined RGBA mask instead. That way the single statement gets
translated to the equivalent call:

 glBlendFunc (GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR);
2010-05-17 16:31:28 +01:00
Neil Roberts
acea83d7ae cogl-path: Use true copy-on-write semantics
Previously a path copy was implemented such that only the array of
path nodes was shared with the source and the rest of the data is
copied. This was so that the copy could avoid a deep copy if the
source path is appended to because the copy keeps track of its own
length. This optimisation is probably not worthwhile because it makes
the copies less cheap. Instead the CoglPath struct now just contains a
single pointer to a new CoglPathData struct which is separately
ref-counted. When the path is modified it will be copied if the ref
count on the data is not 1.
2010-05-11 16:10:39 +01:00
Owen W. Taylor
af37a1029f cogl-framebuffer: Flush journal when creating fbo
Since framebuffer state is not flushed prior to replaying the journal,
the trick of marking the framebuffer dirty prior to calling
glBindFramebuffer() doesn't work... the outstanding journal entries
will get replayed to the newly created framebuffer.

Fix this by flushing the journal as well.

http://bugzilla.openedhand.com/show_bug.cgi?id=2110

Signed-off-by: Robert Bragg <robert@linux.intel.com>
2010-05-10 14:38:10 +01:00
Neil Roberts
0021b4aee0 cogl-clip-stack: Set *stencil_used_p when the stack is empty
If the clip stack is empty then _cogl_clip_stack_flush exits
immediately. This was missing out the assignment of *stencil_used_p at
the bottom of the function. If a path is then used after the clip is
cleared then it would think it needs to merge with the clip so the
stencil would not be cleared correctly.
2010-05-06 14:15:04 +01:00
Neil Roberts
0ff02d18d2 gles: Fix the functions names for the GL_OES_framebuffer_object ext
In 91cde78a7 I accidentally changed the function names that get looked
up for the framebuffer extension under GLES so that they didn't have
any suffix. The spec for extension specifies that they should have the
OES suffix.
2010-05-05 12:24:11 +01:00
Damien Lespiau
71f942d03a debug: Use G_UNLIKELY in the tests
Debugging code is not meant to be run in the nominal code path. Use
G_UNLIKELY to be reduce the number of bubbles in the instruction
pipeline.

Took the opportunity to re-indent the macros.
2010-05-04 17:01:14 +01:00
Robert Bragg
d6dbd62021 debug: wrap glClear calls with the GE macro
This adds a GE macro wrapper around our calls to glClear so we can
print a warning for any errors reported by the driver.
2010-04-30 12:10:16 +01:00
Neil Roberts
e477768bd8 cogl-texture-2d-sliced: Use the converted bitmap when uploading
When uploading texture data the cogl-texture-2d-sliced backend was
using _cogl_texture_prepare_for_upload to create a bitmap suitable for
upload but then it was using the original bitmap instead of the new
bitmap for the data. This was causing any format conversions performed
by cogl_texture_prepare_for_upload to be ignored.

http://bugzilla.openedhand.com/show_bug.cgi?id=2059
2010-04-29 13:15:36 +01:00
Neil Roberts
405d529f44 cogl-texture: Don't attempt to use GL to convert formats under GLES
In commit abe91784c4 I changed cogl-texture so that it would use the
OpenGL mechanism to specify a different internal texture format from
the image format so that it can do the conversion instead of
Cogl. However under GLES the internal format and the image format must
always be the same and it only supports a limited set of formats. This
patch changes _cogl_texture_prepare_for_upload so that it does the
conversion using the cogl bitmap code when compiling for GLES.

http://bugzilla.openedhand.com/show_bug.cgi?id=2059
2010-04-29 13:15:35 +01:00
Neil Roberts
8530b7946a cogl-material: Fix the check to prevent using too many layers
There was a check at the bottom of the loop which sets up the state
for each of the layers so that it would break from the loop when the
maximum number of layers is reached. However after doing this it would
not increment 'i'. 'i' is later used to disable the remaining layers
so it would end up disabling the last layer it just set up.

This patch moves the check to be part of the loop condition so that
the check is performed after incrementing 'i'.

http://bugzilla.openedhand.com/show_bug.cgi?id=2064
2010-04-29 12:15:17 +01:00
Neil Roberts
3c2bb33cbd cogl-material: Fix the warning for when too many layers are used
The warning displayed when too many layers are used had an off-by-one
error so that it would display even if exactly the maximum number is
used. There was also a missing space at the end of the line in the
message which looked wrong when displayed on the terminal.

http://bugzilla.openedhand.com/show_bug.cgi?id=2064
2010-04-29 12:15:11 +01:00
Neil Roberts
a881c8b07e cogl-path: Make cogl_path_arc_rel static
cogl_path_arc_rel was never in any public headers so it isn't part of
the public API. It also has a slightly inconsistent name because the
rest of the relative path functions are called cogl_path_rel_*. This
patch makes it static for now to make it more obvious that it isn't
public. The name has changed to _cogl_path_rel_arc.
2010-04-22 18:17:59 +01:00
Neil Roberts
e16f05326e cogl-path: Add documentation for the angles of cogl_path_arc
This adds documentation for how Cogl interprets the angles given to
cogl_path_arc.
2010-04-22 18:17:59 +01:00
Neil Roberts
3196658b8c cogl-path: Fix the truncation when adding to a copied path
If a path is copied and then appended to, the copy needs to have the
last sub path truncated so that it fits in the total path size in case
the original path was modified. However the path size check was broken
so if the copied path had more than one sub path it would fail.
2010-04-21 22:36:43 +01:00
Neil Roberts
abc64a2c67 cogl-clip-stack: Use orientation of the polygon to set clip planes
Previously the clip stack code was trying to detect when the
orientation of the on-screen rectangle had changed by checking if the
order of the y-coordinates on the left edge was different from the
order the x-coordinates on the top edge. This doesn't work for some
rotations which was causing the clip planes to clip the wrong side of
the line. This patch makes it detect the orientation by calculating
the signed area which is a standard computer graphics algorithm.

http://bugzilla.openedhand.com/show_bug.cgi?id=2079
2010-04-21 13:24:59 +01:00
Neil Roberts
7f2b2e1364 cogl-path: Document how a shape is filled
This adds some documentation to cogl_path_fill() describing the fill
rule Cogl uses.
2010-04-21 13:20:23 +01:00
Neil Roberts
44c86fcead cogl-path: Don't try to union sub paths
When drawing a path with only a single sub path, Cogl uses the
'even-odd' fill rule which means that if a part of the path intersects
with another part then the intersection would be inverted. However
when combining sub paths it treats them as separate paths and then
unions them together. This doesn't match the semantics of the even-odd
rule in SVG and Cairo. This patch makes it so that a new sub path is
just drawn as another triangle fan so that it will continue to invert
the stencil buffer. This is also much simpler and more efficient as
well as being more correct.

http://bugzilla.openedhand.com/show_bug.cgi?id=2088
2010-04-21 11:39:28 +01:00
Neil Roberts
0cb09cd40d cogl_read_pixels: Always use GL_RGBA/GL_UNSIGNED_BYTE under GLES
Under GLES glReadPixels is documented to only support GL_RGBA with
GL_UNSIGNED_BYTE and an implementation specfic format which can be
fetched with glGet, GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES and
GL_IMPLEMENTATION_COLOR_READ_TYPE_OES. This patch makes it always read
using GL_RGBA and GL_UNSIGNED_BYTE and then convert the results if
neccessary.

This has some room for improvement because it doesn't attempt to use
the implementation specific format. Also the conversion is somewhat
wasteful because there are currently no cogl_bitmap_* functions to
convert without allocating a new buffer so it ends up doing an
intermediate copy.

http://bugzilla.openedhand.com/show_bug.cgi?id=2057
2010-04-21 10:56:21 +01:00
Neil Roberts
9750b90f37 cogl-bitmap: Fix converting formats with and without alpha channels
_cogl_bitmap_convert_format_and_premult was failing when converting
from RGBA to RGB and vice versa. _cogl_bitmap_fallback_convert
converts without altering the premult status so when choosing a new
format it would copy over the premult bit. However, it did this
regardless of whether the new format had an alpha channel so when
converting from RGBA_8888_PRE to RGB_888 it would end up inventing a
new meaningless format which would be RGB_888_PRE. This patch makes it
avoid copying the premult flag if the destination has no alpha. It
doesn't matter if it copies when the source format has no alpha
because it will always be unset.

_cogl_bitmap_convert_format_and_premult was also breaking when
converting from RGBA_8888_PRE to RGB_888 because it would think
RGB_888 is unpremultiplied and try to convert but then
_cogl_bitmap_fallback_premult wouldn't know how to do the conversion.

http://bugzilla.openedhand.com/show_bug.cgi?id=2057
2010-04-21 10:56:21 +01:00
Neil Roberts
708bbc72e1 cogl: Implement retained clip stacks
This adds three new internal API functions which can be used to retain
the clip stack state and restore it later:

 _cogl_get_clip_stack
 _cogl_set_clip_stack
 _cogl_clip_stack_copy

The functions are currently internal and not yet used but we may want
to make them public in future to replace the cogl_clip_stack_save()
and cogl_clip_stack_restore() APIs.

The get function just returns the handle to the clip stack at the top
of the stack of stacks and the set function just replaces it.

The copy function makes a cheap copy of an existing stack by taking a
reference to the top stack entry. This ends up working like a deep
copy because there is no way to modify entries of a stack but it
doesn't actually copy the data.
2010-04-15 14:51:01 +01:00
Neil Roberts
3a58bc440b cogl-clip-stack: Convert to be a CoglHandle
CoglClipStacks can now be reference counted via a CoglHandle. The
ClipClipState now stores handles in the list rather than CoglClipStack
pointers.
2010-04-15 14:51:01 +01:00
Neil Roberts
aba7fb63cb Separate out CoglClipStackState from cogl-clip-stack.c
CoglClipStackState has now been renamed to CoglClipState and is moved
to a separate file. CoglClipStack now just maintains a stack and
doesn't worry about the rest of the state. CoglClipStack sill contains
the code to flush the stack to GL.
2010-04-15 14:51:00 +01:00
Neil Roberts
732223074b cogl-slip-stack: Store clip window rect entries in Cogl coordinates
When glScissor is called it needs to pass coordinates in GL's
coordinate space where the origin is the bottom left. Previously this
conversion was done before storing the window rect in the clip
stack. However this might make it more difficult if we want to be able
to grab a handle to a clip stack and use it in different circumstances
later. This patch moves the coordinate conversion to inside the clip
state flushing code.
2010-04-15 14:50:55 +01:00
Neil Roberts
e9aa5d807c cogl-clip-stack: Store window rect entries as ints not floats
The window rectangles are passed in as integers so there is no point
in converting them to floats when storing a stack entry for them.
2010-04-15 14:50:26 +01:00
Neil Roberts
a0e19c9469 cogl-clip-stack: Use reference counted stack entries
The stack is now stored as a list of reference counted entries.
Instead of using a GList, each entry now contains a link with a
reference to its parent. The idea is that this would allow copying
stacks with a shared ancestry.

Previously the code flushed the state by finding the bottom of the
stack and then applying each entry by walking back up to the top. This
is slightly harder to do now because the list is no longer
doubly-linked. However I don't think it matters which order the
entries are applied so I've just changed it to apply them in reverse
order.

There was also a restriction that if ever the stencil buffer is used
then we could no longer use clip planes for any subsequent entries. I
don't think this makes sense because it should always work as long as
it doesn't attempt to use the clip planes more than once. I've
therefore removed the restriction.
2010-04-15 14:47:01 +01:00
Neil Roberts
1445e9d32d cogl-atlas-texture: Fix a memory leak
The CoglAtlasTexture struct was not being freed in
_cogl_atlas_texture_free so there would be a small leak whenever a
texture was destroyed.

Thanks to Robert Bragg for spotting this.
2010-04-13 17:26:03 +01:00
Neil Roberts
30f43c6cda cogl-material: Use CLAMP_TO_EDGE for WRAP_AUTOMATIC unless overriden
CoglMaterial now sets GL_CLAMP_TO_EDGE if WRAP_MODE_AUTOMATIC is used
unless it is overridden when the material is flushed. The primitives
are still expected to expose repeat semantics so no user visible
changes are made. The idea is that drawing non-repeated textures is
the most common case so if we make clamp_to_ege the default then we
will reduce the number of times we have to override the
material. Avoiding overrides will become important if the overriding
mechanism is replaced with one where the primitive is expected to copy
the material and change that instead.
2010-04-12 15:44:23 +01:00
Neil Roberts
75f1dc90b0 cogl-material: Add support for setting the wrap mode for a layer
Previously, Cogl's texture coordinate system was effectively always
GL_REPEAT so that if an application specifies coordinates outside the
range 0→1 it would get repeated copies of the texture. It would
however change the mode to GL_CLAMP_TO_EDGE if all of the coordinates
are in the range 0→1 so that in the common case that the whole texture
is being drawn with linear filtering it will not blend in edge pixels
from the opposite sides.

This patch adds the option for applications to change the wrap mode
per layer. There are now three wrap modes: 'repeat', 'clamp-to-edge'
and 'automatic'. The automatic map mode is the default and it
implements the previous behaviour. The wrap mode can be changed for
the s and t coordinates independently. I've tried to make the
internals support setting the r coordinate but as we don't support 3D
textures yet I haven't exposed any public API for it.

The texture backends still have a set_wrap_mode virtual but this value
is intended to be transitory and it will be changed whenever the
material is flushed (although the backends are expected to cache it so
that it won't use too many GL calls). In my understanding this value
was always meant to be transitory and all primitives were meant to set
the value before drawing. However there were comments suggesting that
this is not the expected behaviour. In particular the vertex buffer
drawing code never set a wrap mode so it would end up with whatever
the texture was previously used for. These issues are now fixed
because the material will always set the wrap modes.

There is code to manually implement clamp-to-edge for textures that
can't be hardware repeated. However this doesn't fully work because it
relies on being able to draw the stretched parts using quads with the
same values for tx1 and tx2. The texture iteration code doesn't
support this so it breaks. This is a separate bug and it isn't
trivially solved.

When flushing a material there are now extra options to set wrap mode
overrides. The overrides are an array of values for each layer that
specifies an override for the s, t or r coordinates. The primitives
use this to implement the automatic wrap mode. cogl_polygon also uses
it to set GL_CLAMP_TO_BORDER mode for its trick to render sliced
textures. Although this code has been added it looks like the sliced
trick has been broken for a while and I haven't attempted to fix it
here.

I've added a constant to represent the maximum number of layers that a
material supports so that I can size the overrides array. I've set it
to 32 because as far as I can tell we have that limit imposed anyway
because the other flush options use a guint32 to store a flag about
each layer. The overrides array ends up adding 32 bytes to each flush
options struct which may be a concern.

http://bugzilla.openedhand.com/show_bug.cgi?id=2063
2010-04-12 15:44:23 +01:00
Neil Roberts
463ebc8220 Split the wrap mode of _cogl_texture_set_wrap_mode into three
GL supports setting different wrap modes for the s, t and r
coordinates so we should design the backend interface to support that
also. The r coordinate is not currently used by any of the backends
but we might as well have it to make life easier if we ever add
support for 3D textures.

http://bugzilla.openedhand.com/show_bug.cgi?id=2063
2010-04-12 15:44:23 +01:00
Neil Roberts
774f5e0bdf cogl: Make private members really hard to accidentally use
CoglColor and CoglMatrix have public declarations with private members
so that we are free to change the implementation but the structures
could still be allocated on the stack in applications. However it's
quite easy not to realise the members are private and then access them
directly. This patch wraps the members in a macro which redefines the
symbol name when including the header outside of the clutter source.

http://bugzilla.openedhand.com/show_bug.cgi?id=2065
2010-04-12 15:38:58 +01:00
Neil Roberts
3fea5051db CoglMatrix: Don't make the matrix fields private
The xx, yx, zx etc fields are meant to be read-only but they were
marked as private with the gtk-doc annotation. This patch moves the
private marker so that the 16 float member fields are public but the
type, inverted matrix, flags and padding are not.
2010-04-12 15:38:58 +01:00
Neil Roberts
94465cfe39 Fix indentation in CoglMatrix
The members of CoglMatrix were indented by 4 characters instead of 2.
2010-04-12 15:38:58 +01:00
Neil Roberts
9ee6dd240b cogl: Support retained paths
This adds three new API calls:

  CoglHandle cogl_path_get()
  void cogl_path_set(CoglHandle path)
  CoglHandle cogl_path_copy(CoglHandle path)

All of the fields relating to the path have been moved from the Cogl
context to a new CoglPath handle type. The cogl context now just
contains a CoglPath handle. All of the existing path commands
manipulate the data in the current path handle. cogl_path_new now just
creates a new path handle and unrefs the old one.

The path handle can be stored for later with cogl_path_get. The path
can then be copied with cogl_path_copy. Internally it implements
copy-on-write semantics with an extra optimisation that it will only
copy the data if the new path is modified, but not if the original
path is modified. It can do this because the only way to modify a path
is by appending to it so the copied path is able to store its own path
length and only render the nodes up to that length. For this to work
the copied path also needs to keep its own copies of the path extents
because the parent path may change these by adding nodes.

The clip stack now uses the cogl_path_copy mechanism to store paths in
the stack instead of directly copying the data. This should save some
memory and processing time.
2010-04-08 19:53:38 +01:00
Robert Bragg
45885850d2 cogl: renames cogl_multiply_matrix to cogl_transform
Although cogl_multiply_matrix was consistent with OpenGL, after further
consideration it was agreed that cogl_transform is a better name. Given
that it's in the global cogl_ namespace cogl_transform seems more self
documenting.
2010-04-08 14:37:01 +01:00
Robert Bragg
412a468d5e docs: This improves the documentation for cogl_push_framebuffer
This adds an example of how to setup a Clutter style 2D coordinate space
and clarifies what state is owned by a framebuffer. (projection,
modelview, viewport and clip stack)

When we expose more cogl_framebuffer API this example will hopefully be
migrated into a more extensive introduction to using framebuffers.
2010-04-06 09:26:10 +01:00
Robert Bragg
6f6ab86929 cogl: move cogl_set_source* funcs into cogl.c
Previously cogl_set_source and cogl_set_source_texture were in
cogl-material.c and the cogl_set_source_color* funcs were in
cogl-color.c. Originally this was because cogl.c was duplicated between
the GL and GLES backends and we didn't want to add to the amount of
duplicated code, but these files have since been consolidated into one
cogl.c.
2010-04-06 09:26:05 +01:00
Robert Bragg
a678e9f627 cogl: adds convenience cogl_multiply_matrix function
Quite often it's desirable to be able to multiply the current modelview
matrix by an arbitrary matrix. Currently though you have to first
explicitly call cogl_get_modelview_matrix to get the current modelview
into a temporary variable, then you need to multiply it with your matrix
using cogl_matrix_multiply and finally use cogl_set_modelview_matrix to
make the result be the new modelview. This new convenience function lets
more efficiently skip the first get and last set steps.
2010-04-01 13:24:56 +01:00
Robert Bragg
1dd70aff73 cogl: rename cogl_enable to _cogl_enable
Every now and then someone sees the cogl_enable API and gets confused,
thinking its public API so this renames the symbol to be clear that it's
is an internal only API.
2010-04-01 12:34:42 +01:00
Emmanuele Bassi
5395a7a998 Use begin/end macros in cogl-primitives.h
Protect the people using a C++ compiler from the dark abyss of C code.

http://bugzilla.openedhand.com/show_bug.cgi?id=2049
2010-03-25 09:33:26 +00:00
Owen W. Taylor
913c187f4e Switch texture units before calling _cogl_texture_set_filters()
When setting up the state for a layer, we need to switch texture
units before we do anything that might bind the texture, or
we'll bind the wrong texture to the previous unit.

http://bugzilla.openedhand.com/show_bug.cgi?id=2033

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-03-19 11:23:48 +00:00
Owen W. Taylor
bfd2b19290 Set pixel store parameters before calling glGetTexImage
We need to set up the rowstride and alignment properly in
CoglTexture2D before reading texture data.

http://bugzilla.openedhand.com/show_bug.cgi?id=2036

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-03-19 10:21:34 +00:00
Colin Walters
60d8369a1a Return and warn if a handle's refcount is <= 0
This makes it more likely consumers notice invalid unreferences.
GObject has the same assertion.

http://bugzilla.openedhand.com/show_bug.cgi?id=2029

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-03-15 16:22:20 +00:00
Neil Roberts
c2faaa4f39 cogl-texture-2d: Determine format before checking texture support
When entering cogl_texture_2d_new_from_bitmap the internal format can
be COGL_PIXEL_FORMAT_ANY. This was causing _cogl_texture_2d_can_create
to use an invalid GL format type. Mesa apparently ignores this but it
was causing errors when Cogl is compiled with debugging under NVidia.

http://bugzilla.openedhand.com/show_bug.cgi?id=2026
2010-03-15 16:09:52 +00:00
Owen W. Taylor
a25885edf2 Fix checks for out-of-bounds coordinates and repeats
Add a return result from CoglTexture.transform_quad_coords_to_gl(),
so that we can properly determine the nature of repeats in
the face of GL_TEXTURE_RECTANGLE_ARB, where the returned
coordinates are not normalized.

The comment "We also work out whether any of the texture
coordinates are outside the range [0.0,1.0]. We need to do
this after calling transform_coords_to_gl in case the texture
backend is munging the coordinates (such as in the sub texture
backend)." is disregarded and removed, since it's actually
the virtual coordinates that determine whether we repeat,
not the GL coordinates.

Warnings about disregarded layers are used in all cases where
applicable, including for subtextures.

http://bugzilla.openedhand.com/show_bug.cgi?id=2016

Signed-off-by: Neil Roberts <neil@linux.intel.com>
2010-03-15 16:09:41 +00:00
Owen W. Taylor
f13a42793a CoglTexture2DSliced: Handle TEXTURE_RECTANGLE_ARB
In _cogl_texture_2d_sliced_foreach_sub_texture_in_region(), don't
assert that the target is GL_TEXTURE_2D; instead conditionalize
normalization on the target.

http://bugzilla.openedhand.com/show_bug.cgi?id=2015
2010-03-04 12:57:53 +00:00
Emmanuele Bassi
1b57800208 Update stb_image.c
Upstream "released" 1.18.
2010-03-03 17:02:51 +00:00
Robert Bragg
9d1ea81dc5 cogl debug: Adds missing guards around debug cogl_args[]
commit 511e5ceb51 accidentally removed the #ifdef COGL_ENABLE_DEBUG
guards around the "cogl-debug" and "cogl-no-debug" cogl_args[] which
this patch restores.
2010-03-02 16:15:39 +00:00
Owen W. Taylor
0baeabc2aa Fall back in _cogl_texture_2d_new_from_bitmap()
Just like _cogl_texture_2d_new_with_size(),
_cogl_texture_2d_new_from_bitmap() needs to check if an unsliced
texture can be created at the given size, or if hardware
limitations prevent this.

http://bugzilla.openedhand.com/show_bug.cgi?id=2014

Signed-off-by: Neil Roberts <neil@linux.intel.com>
2010-03-02 11:48:15 +00:00