Dirk Reiners wrote:
        Hi Marcus,

On Mon, 2005-05-02 at 16:58 +0200, Marcus Lindblom wrote:

Hi all,

I'm having stupid problems with materials.

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?

By fiddling a bit (hade some texture slots wrong), I got it to work when doing "write(scene); scene = read();", but not without those two lines?
What manner of trickery be this? ;-)

The saved file is here: http://yar.nu/macke/scene.osb (~1 mb). (Andreas requested it). But that saved file works perfectly, it's when not doing the save that it bugs out on me.

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?

That code is very much exactly what I do. (I add one MaterialChunk and one TextureChunk to a ChunkMaterial, and set that on all material-applicable cores in the graph.)

/Marcus

P.S. It would be nice if MaterialGroup and Geometry would inherit from some abstract interface MaterialCore (or something with a better name) that implements xxxMaterial()-functions so that one could make functions that deal with material-cores only depend on one type. However, that would imply some multiple virtual inheritance (albeit without data, so it's not that bad).


-------------------------------------------------------
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

Reply via email to