Hi Marcus,
On Mon, 2005-05-02 at 16:58 +0200, Marcus Lindblom wrote:
> Hi all,
>
> I'm having stupid problems with materials.
>
> When I create and use my own material (even if I use a SimpleMaterial),
> I only get a all-white rendering, no matter what I do. The chunks do not
> seem to be applied eiter, since my vertexprogram with purposeful gross
> syntax error in it is ignored. The predefined material set by the
> vrml-loader works nicely though (adding chunks and everything. I've got
> normalmapping already. Yay!)
Cool!
> However, when I create my material from scratch I don't get any respect
> at all. What I do is to simply traverse the graph and call setMaterial()
> for all materialgroups and geometries encountered. I assume this is the
> proper way to do it.
Yup.
> Dumping the scene afterwards shows the material being attached, but the
> rendering is still very screwed.
What happens when you save the scene and load it again?
> Again, this is probably something very simple (like last week's
> problem), but I'm stumped after working on it for 5 hours. Also, I'm
> just learning how to debug my stuff efficiently so there might be
> something obvious I've missed.
In general your approach should work, I do the same in
Source/State/testCubeTexture.cpp and that works fine with VRML models.
Can you try that on your models and see how that compares to your code?
Hope it helps
Dirk
--
-- Dirk Reiners OpenSG Forum [EMAIL PROTECTED]
-- The OpenSG Open Source Scenegraph: http://www.opensg.org
-- Join the list at http://lists.sf.net/lists/listinfo/opensg-users
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users