[Verse-dev] Creating some basic geometry

Emil Brink emil at obsession.se
Mon Feb 11 09:24:01 CET 2008


On 2/11/08, Daniel Collin <daniel at collin.com> wrote:
> Hi,
>
> I just started to dig some more with Verse and even though I haven't
> tested it much yet but I tried to generate a cube to get displayed (im
> using the QuelSolaar viewer under win32 and my own smallish program to
> send some geometry)
>
> I do this in my connect_accept_callback:
[...]
> I get no display in the viewer so I assume I created the geometry wrong
> and/or I have missed something.
>
> Anyone has any idea of whats going wrong here?

Hi!

Well, there are a couple of issues with your code. I just read it very
quickly (I don't have a lot of time right now, sorry), but here's what
stood out:

1. You can't do all that work in the connect_accept callback. You need
to use more callbacks, and do the proper step in each. You can create
your nodes in the connect_accept, but you can't create layers until
you know the ID:s of the node you created. You need to do that in the
node_create callback(s).
2. As Amir pointed out, you must create a properly labelled link from
the object node to the geometry node, to define the relationship.
3. It is also recommended, and clearer, to wait for the layer_create
callbacks to use the proper layer ID:s (even though ID:s 0 and 1 are
well-known).

In short, I recommend that you read
<http://projects.blender.org/plugins/scmsvn/viewcvs.php/trunk/verse-tests/geotest.c?revision=2700&root=verse&view=markup>.
It's a bit more than you aim to do, but it should show the "proper"
way to structure a Verse program.

As always, thanks for your interest in Verse.

Regards,

/Emil


More information about the Verse-dev mailing list