Your code works fine here.
What version of clutter / pyclutter are you using ?
You should try the git pyclutter version:
git://git.gnome.org/pyclutter

On Wed, Nov 23, 2011 at 5:04 PM, Peter Lunden <[email protected]> wrote:
> You mean like this:
>                Cogl.polygon(((0, 0, 0, 0.0, 1.0, (1, 1, 1, 1.0)),\
>                              (400.0, 0, 0, 1.0, 1.0, (1, 1, 1, 1.0)),\
>                              (400.0, 200.0, 0, 1.0, 0.0, (1, 1, 1, 0)),\
>                              (0, 200.0, 0, 0.0, 0.0, (1, 1, 1, 0))),\
>                              True)
>
> I've already tried that and it does not work, get message: TypeError:
> polygon() takes exactly 3 arguments (2 given)
>
> Only thing I've tried that gave a different message was to put in the n,
> then it says: TypeError: Expected Cogl.TextureVertex, but got StructMeta
>
>
> On 11/23/11 16:43, yann LE HIR wrote:
>>
>> I never used it but from the code of the python bindings, it seems
>> that the method should be called like this :
>> cogl.polygon(vertices,color)
>>
>> with vertices being a tuple of tuple :
>> ((x, y, z, tx, ty),(x, y, z, tx, ty, color), ...)
>> both format accepted.
>> and color being a 3 or 4 tuple of float from 0.0-1.0.
>>
>> On Wed, Nov 23, 2011 at 4:24 PM, Peter Lunden<[email protected]>  wrote:
>>>
>>> I like to call Cogl.polygon(vertices, n, useColor) but it is not clear to
>>> me
>>> how to provide the vertices from Python.
>>>
>>> I have tried different things like an array or tuple of
>>> Cogl.TextureVertex
>>> but that does not work. How do you do this?
>>>
>>> Regards,
>>> Peter Lundén
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> clutter-app-devel-list mailing list
>>> [email protected]
>>> http://lists.clutter-project.org/listinfo/clutter-app-devel-list
>>>
>
>
> --
> Peter Lundén
> Interactive Institute, Sonic Studio
> Box 1197, SE-164 26 Kista, Sweden
> Phone: +46 70 778 17 22
> www.tii.se/sonic
>
>
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to