> Hi all,
> 
> I was just wondering how to draw simple 2D forms, like rectangles, squares, 
> circles,triangles,etc...
> In fact, I'm trying to draw buttons,and I don't have found any low-level 
> fonction to do that,without talking about Vertex.
> 
> I had the idea to use Vertex, like in lesson-002.py of the tutorial, i.e. :
> 
> model.Face(pyramid, [model.Vertex(pyramid,  0.5, -0.5,  0.5),
>                      model.Vertex(pyramid, -0.5, -0.5,  0.5),
>                      model.Vertex(pyramid, -0.5, -0.5, -0.5),
>                      model.Vertex(pyramid,  0.5, -0.5, -0.5),
>                      ], material)
> 
> But i don't know how to do this without using a world(Class need).
> 
> 
> Thank you for your help.
> Herv�.

First, for drawing 2D rectangle, you NEED vertex, but not World or Face.
The easiest way to do this is to subclass the Widget class (from soya.widget) and 
override the render() method. In this method, you can call OpenGL primitive for 
drawing vertex and faces.

See tutorial lesson 108 and 109 about widget.

Jiba


--
Pour vous desabonner envoyez un mail a [EMAIL PROTECTED]

Reply via email to