RE: [Plib-devel] SSG bux fixes for untextured .3ds objects
Brought to you by:
sjbaker
From: Dave M. <Dav...@dy...> - 2000-08-14 18:05:23
|
Nice job tracking this down Dan! I don't understand OpenGL lighting very well so could another plib developer investigate this? --Dave > Last week I posted on plib-users about problems I was having > with .3ds objects > that were not textured. I figured out a couple changes that > solved the problems > for me, and I'm assuming this is the right place to post them. > > 1. Non-textured objects show up as white when textured > objects drawn before them. > > I started with the tux ssg example program. One of the > textured objects drawn > sets the GL_EMISSION material values to 1.0,1.0,1.0. When > the .3ds objects are > drawn without textures it sets the ambient, diffuse, and > specular material properties, > but doesn't set the emissive back to 0.0. I added a line to > ssgSimpleState::apply > to set it to 0.0 if it isn't specified. I don't know if this > is the correct place or > not. > > 2. First non-textured object always shows up as white in > scene with or without textures > > I believe this was happening because > glDisable(GL_COLOR_MATERIAL) is called AFTER > the glMaterial calls in ssgSimpleState::apply. This causes > the glMaterial calls > to be ignored for the first object, but work for subsequent > objects. I think that is > what happens. My workaround was to move the ssgDisableTable > call to before > the glMaterial calls. > > I don't know if either of these is the proper solution, or if > they would break > other areas. They seemed to work for me though. > > Dan > > _______________________________________________ > plib-devel mailing list > pli...@li... > http://lists.sourceforge.net/mailman/listinfo/plib-devel > |