[PD] mesh_square
marius schebella
marius.schebella at gmail.com
Sun Apr 6 20:09:41 CEST 2008
cyrille henry wrote:
>
>
> marius schebella a écrit :
>> cyrille henry wrote:
>>>
>>>
>>> marius schebella a écrit :
>>>> hi cyrille,
>>>> with mesh_square, are there other arguments to the draw message than
>>>> "default" "line" and "point"?
>>> you can send to mesh_square all draw style that you can send to any
>>> other gem primitive. but only this one work as expected.
>>>> and what is the "default" draw method?
>>>
>>> if(m_drawType==GL_DEFAULT_GEM)m_drawType=GL_TRIANGLE_STRIP;
>>
>> if I send the message draw triangle_strip then it looks different than
>> the default. if I send draw + integernumber, I get error: Bad
>> arguments for message 'draw' to object 'mesh_square'
> what's the problem with draw DEFAULT?
no problem with default, only missing the rest of the drawmethods
(GL_LINES, GL_LINE_STRIP, GL_QUAD_STRIP, GL_TRIANGLE_FAN). ok for now.
marius.
>
> in gemshape.cpp you'll find :
> switch (c){
> case 'D': // default
> m_drawType = GL_DEFAULT_GEM;
> break;
> case 'L': // line
> m_drawType = GL_LINE_LOOP;
> break;
> case 'F': // fill
> m_drawType = GL_POLYGON;
> break;
> case 'Q': // quads
> m_drawType = GL_QUADS;
> break;
> case 'P': // point
> m_drawType = GL_POINTS;
> break;
> case 'T': // triangles
> m_drawType = GL_TRIANGLES;
> break;
> case 'S': // strip
> m_drawType = GL_TRIANGLE_STRIP;
> break; in this code, c is the 1st letter after "draw ".
> so draw Triangle_strip is the same as draw Triangle, or draw Turtle
> try "draw STRIP", or "draw Something" to draw triangle_strip....
> (STRIP in more logic, but anything starting with S will work).
More information about the Pd-list
mailing list